Node.bcrypt.js: bcrypt not working in current node 9.3.0

Created on 27 Dec 2017  路  7Comments  路  Source: kelektiv/node.bcrypt.js

Hi,

when i run npm install and run my project, it doesn't install bcrypt whereas all other dependencies are installed.

module.js:557
throw err;
^

Error: Cannot find module 'E:*node_modulesbcrypt\lib\bindingbcrypt_lib.node'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object. (E:*
*
node_modulesbcryptbcrypt.js:6:16)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object. (E:**\app\models\user.model.js:4:14)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)

Most helpful comment

You need to compile the module. Run npm rebuild bcrypt

All 7 comments

You need to compile the module. Run npm rebuild bcrypt

I tried several ways, not the one you mentioned above. But after all failures, i downgrade node to 8.9.3 version and npm to under 5. Then delete all node modules and first install bcrypt and then install all other modules. That trick did work.

NodeJS 9 and npm have weird issues. Please stick to NodeJS 8 till all of them are resolved.

it don't work in nodejs 9 use 8 is the answer - no that is not an answer that's excuse.

@alexmac131 I understand your frustration, but sometimes npm breaks after new Node releases and all we can do is wait for them to fix it.

Good news it bcrypt now works fine with NodeJS 9 and the latest version of NPM. We also have published the pre-built binaries for Linux and macOS.

Solution change from bcrypt to bcryptjs - working

If you want to block your event loop, then yes

Was this page helpful?
0 / 5 - 0 ratings