0

I was following the Christopher Buechler tutorial (http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/)for getting started with Node/Express/MongoDB. I made it to Step 6 where where I'm trying to display the userlist on the local host but I can't get npm start to work.

When I do npm start it says cannot find module 'mongodb'

As per one helpful person in the comments: I had to do npm install mongo --save and npm install monk --save

but this has not helped npm start to work.

What's next? I retraced my footsteps to make sure I haven't missed anything. Here is what my command line says:

C:\node>cd nodetest1

C:\node\nodetest1>npm start

nodetest1@0.0.1 start C:\node\nodetest1 node ./bin/www

module.js:340 throw err; ^ Error: Cannot find module 'mongodb' 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. (C:\node\nodetest1\app.js:9:13) 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 Module.require (module.js:364:17)

npm ERR! nodetest1@0.0.1 start: node ./bin/www npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the nodetest1@0.0.1 start script. npm ERR! This is most likely a problem with the nodetest1 package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./bin/www npm ERR! You can get their info via: npm ERR! npm owner ls nodetest1 npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program File s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "start" npm ERR! cwd C:\node\nodetest1 npm ERR! node -v v0.10.31 npm ERR! npm -v 1.4.23 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\node\nodetest1\npm-debug.log npm ERR! not ok code 0

C:\node\nodetest1>

Thank you for the help!

Stennie
  • 63,885
  • 14
  • 149
  • 175
rashadb
  • 2,515
  • 4
  • 32
  • 57

0 Answers0