I installed bcoin and I get this error about the version:

$ node -v
$ npm -v
$ bcoin
    throw e;
Error: The module '/usr/lib/node_modules/bcoin/node_modules/leveldown/build/Release/leveldown.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at bindings (/usr/lib/node_modules/bcoin/node_modules/leveldown/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/usr/lib/node_modules/bcoin/node_modules/leveldown/leveldown.js:4:46)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)

any ideas why?

1 Answer 1


This probably happened because you updated your node version after your installation of bcoin. You need to recompile the C++ bindings for the leveldown module to fix this. Checkout npm rebuild: https://docs.npmjs.com/cli/rebuild

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.