Error: Cannot find module 'mongodb/node_modules/bson'
Closed this issue ยท 9 comments
I got this error when starting mongodb. Here's a link to resolve the problem.
I changed to mongoose 4.2.6 in package.json and ran this. Deletes the node_modules and re-installs them.
npm install -g node-gyp
cd /to/you/project
rm -rf node_modules
npm install
Updating mongoose has fixed this for me
I second gavmck's statement
I fixed it with dsinkey's solution ,thanks
I attempted to be a good citizen and send a PR for the dep change in package.json
Then I realized I do not have permission to push a branch. So here would be the diff:
- "mongoose": "^3.8.23",
+ "mongoose": "^4.2.6",
then just blow away your node_modules and reinstall
Updated the mongoose version in package.json
. Thanks everyone.
I am still getting the same error, even after executing the following commands.
npm install -g node-gyp
cd /to/you/project
rm -rf node_modules
npm install
Which version of node are you guys using ? mine is 8.1 and I am on Windows.
me too how did you fixed it
@jblossomweb Thanks man, works for me!
"npm update mongoose" - doesn't work for me, but when i did
"npm r mongoose"
and then
"npm i mongoose"
everything was fine