When I deployed my Node.js + MongoDB application on my test server, I met “Failed to load c++ bson extension, using pure JS version”. Even with the pure JS mongo driver the application works, but I still want to fix it.
After google, I got following method to fix my problem:
1. Install build-essential package:
1
|
|
2. Remove the mongodb module related node modules in node_modules, such as connect-mongo
, mongoose
1
|
|
3. Re-install the mongodb module related node modules
1
|
|