You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can copy this file (server.js) into our Twitter directory (the same one that contains
tweet_counter.js) and then modify it so that it imports our tweet counter module and
uses the counts that we’ve exported.
However once I have done this and run the server I get the following error:
module.js:340
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/vagrant/app/Twitter/server.js:1:77)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
This is because at no point does the book say to copy/install the express module into app/Twitter/node_modules. At this point in the book we only have:
vagrant@precise32:~/app/Twitter/node_modules$ ls
ntwitter
The text was updated successfully, but these errors were encountered:
Gregory Hill writes:
The text was updated successfully, but these errors were encountered: