Can't use mongodb

January 16, 2014 10.3k 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

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
Run `npm update` and it'll disappear.
Have another answer? Share your knowledge.