scotch-io / react-tweets

Code repository for the tutorial by @kenwheeler: Build A Real-Time Twitter Stream with Node and React.js
http://scotch.io/tutorials/javascript/build-a-real-time-twitter-stream-with-node-and-react-js
697 stars 340 forks source link

Error: Cannot find module 'mongodb/node_modules/bson' #22

Closed dsinkey closed 8 years ago

dsinkey commented 8 years ago

I got this error when starting mongodb. Here's a link to resolve the problem.

https://github.com/Automattic/mongoose/issues/2718

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

gavmck commented 8 years ago

Updating mongoose has fixed this for me

npineda commented 8 years ago

I second gavmck's statement

whupanglong commented 8 years ago

I fixed it with dsinkey's solution ,thanks

jblossomweb commented 8 years ago

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

chris-sev commented 8 years ago

Updated the mongoose version in package.json. Thanks everyone.

noisytoken commented 7 years ago

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.

rosselpha commented 7 years ago

me too how did you fixed it

cayrescript commented 6 years ago

@jblossomweb Thanks man, works for me!

Charlie91 commented 6 years ago

"npm update mongoose" - doesn't work for me, but when i did "npm r mongoose" and then "npm i mongoose" everything was fine