question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load c++ bson

See original GitHub issue

I follow the installation instructions that are in the Wiki on this page. On a clean Ubuntu 12.04 server.

However when i get to the final step, and actually run node main.js I get this error. Not sure why, but is it possible that there is something missing from the instructions? I tried googling this “failed to load c++ bson” issue and attempted a few things, but nothing solved it.

This is the error message:

[Error: /home/spoderman/libreboard/.build/bundle/programs/server/npm/cfs_gridfs/node_modules/mongodb/node_modules/bson/build/Release/bson.node: undefined symbol: _ZN2v86String3NewEPKci]
js-bson: Failed to load c++ bson extension, using pure JS version
/home/spoderman/libreboard/.build/bundle/programs/server/node_modules/fibers/future.js:245
                                                throw(ex);
                                                      ^
Error: /home/spoderman/libreboard/.build/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/build/Release/bcrypt_lib.node: undefined symbol: _ZN2v811HandleScopeC1Ev
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/home/spoderman/libreboard/.build/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
    at Object.<anonymous> (/home/spoderman/libreboard/.build/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/bcrypt.js:3:35)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.Npm.require (/home/spoderman/libreboard/.build/bundle/programs/server/boot.js:162:18)
    at packages/npm-bcrypt/packages/npm-bcrypt.js:9:1
    at packages/npm-bcrypt/packages/npm-bcrypt.js:13:1

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
premcoolcommented, Jan 7, 2017

For future references - I encountered the same issue and employed solution as below without changing node version, as mine is more recent node v4.5.0

Step 1: ./programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/bson/ext/index.js catch block change as below Old: bson = require(‘…/build/Release/bson’); New: bson = require(‘…/browser_build/bson’);

Step 2: (global install) npm install -g node-gyp node-pre-gyp

Step 3: /bundle/programs/server/npm/node_modules/meteor/npm-bcrypt/node_modules# rm -rf bcrypt

Step 4: /bundle# npm install bcrypt

0reactions
flippingtablescommented, Aug 28, 2015

Excellent, thanks for that. For future discoverers of this post, i did this:

Install ‘n’ a node version manager util.

$ npm install -g n
$ n 0.10.40
$ n use 0.10.40 main.js
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load c++ bson extension - Stack Overflow
I just resolved that. bson = require('bson'); and then install the bson module using npm. @DouglasFerguson Not really.
Read more >
Failed to load c++ bson extension, using pure JS version ...
I get this error js-bson: Failed to load c++ bson extension, using pure JS version nodejs v0.11.13, latest osx. It looks that the...
Read more >
Remove Failed to load c++ bson extension message from ...
This error is generally results from when installing the Mongoose Module via the Node Package Manager (npm) it does not build the BSON...
Read more >
Manual Deployment error: js-bson: Failed to load c++ bson ...
I am using node -node -v v0.10.40 on CentOS 7 node bundle/main.js [Error: /public_html/bundle/programs/server/npm/c…
Read more >
Failed to load c++ bson extension, using pure JS version
I've seen this error message: js-bson: Failed to load c++ bson extension, using pure JS version on my local machine for about two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found