I am going through my first node.js project. I\'ve installed mongodb, have a server.js file, and when I try to run it I get this error
module.js:340
thro
Error
jamsheed-h110m-s2ph:~/project/jamsheed/meanStack/mean$ node server.js
module.js:538
throw err;
^
Error: Cannot find module 'mongodb'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/home/haseeb/project/jamsheed/meanStack/mean/server.js:3:13)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
Solved
npm install mongodb
Edit package.json = "mongodb": "^3.0.1", change "mongodb": "3.0.1",