Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg 201, second printing, forgot to mention 'npm install express@3' #67

Open
semmypurewal opened this issue Jan 5, 2015 · 2 comments
Open

Comments

@semmypurewal
Copy link
Owner

Gregory Hill writes:

On page 201 you have:

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

@semmypurewal
Copy link
Owner Author

@mondoleo
Copy link

On a newer Vagrant VirtualBox, the following was needed:
npm install express@3 --no-bin-links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants