Question

Can't use mongodb

Posted January 16, 2014 13k views
Hi! I have ubuntu on my droplet and can't use mongodb for some reason on my nodejs server. I have message "Failed to load c++ bson extension, using pure JS version" in console, but nothing is working after that.
1 comment
  • this is a huge nasty bug since a year or so. you have to use an ancient version of node and reinstall everything clean. its still a problem with node 4.0. iojs 2.4 is the only version i’ve got this to work.

    rm -rf node_modules
    npm cache clean

    npm install mongodb –mongodb:native
    npm install

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers
I have message "Failed to load c++ bson extension, using pure JS version" in console
That's fine, it means that it successfully fell back to the JS version of the driver instead of the native c++ driver.

but nothing is working after that.
What do you mean? Can you pastebin your code?
oh sorry, I've found the problem and it's not in mongo
How did you solve this?!
Run `npm update` and it'll disappear.
Submit an Answer