Node.bcrypt.js: [email protected] failed to install on Node 8.11.4

Created on 1 Sep 2018  Â·  11Comments  Â·  Source: kelektiv/node.bcrypt.js

While trying to install bcrypt on Ubuntu 16, with Node 8.11.4 running, returns following error

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Thanks!

Most helpful comment

I found a temporary solution to work with this problem.
I got the error when I was running the node on Node v8.11.
In bcrypt docs it is recommended to use Bcrypt v1.0.3 for Node x8.x.x

npm_bcrypt_version_compatibility

This works for me on AWS. I hope this should help you around.

:)

All 11 comments

I'm also getting the same error when I install [email protected] using
system Darwin 17.7.0
nvm v0.33.6
node v10.9.0
npm v6.2.0

Please send the logs.

>

Seeing a couple different errors including

18:36:48 error:                     | sed: can't read ./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d.raw: No such file or directory  
gyp: /home/iojs/build/workspace/citgm-smoker/nodes/debian8-64/citgm_tmp/84ba7ed0-1087-4c14-8262-f432c04a6519/bcrypt/build/config.gypi not found (cwd: /home/iojs/build/workspace/citgm-smoker/nodes/debian8-64/citgm_tmp/84ba7ed0-1087-4c14-8262-f432c04a6519/bcrypt) while reading includes of binding.gyp while trying to load binding.gyp 

and

error:                       | rm: cannot remove ‘./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw’: No such file or directory                                              

logs in our CI

https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1531/nodes=debian8-64/console
https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1531/nodes=ubuntu1404-64/console

@MylesBorins This is strange. I do not have a copy of Node 8.12, but it builds fine with 8.11. Are you referencing headers from a non-standard location?

@agathver this was noticed while testing for the v8.12.0 release... apologies for the confusion. The difference appears to be the upgrade from npm v5.6.0 to v6.4.1 (although v6.2.0 appears to exhibit the same behavior).

I believe it is either something in npm or node-gyp that changed... although in our smoke testing bcrypt is the only native module exhibiting this behavior, so there may be something else weird going on.

There be dragons 😄

I found a temporary solution to work with this problem.
I got the error when I was running the node on Node v8.11.
In bcrypt docs it is recommended to use Bcrypt v1.0.3 for Node x8.x.x

npm_bcrypt_version_compatibility

This works for me on AWS. I hope this should help you around.

:)

Rolling back node v10.9.0 => v9.11.2
Updating npm v6.2.0 => v6.4.0
bcrypt 3.0.0 worked for me.

To be clear, the error is not consistent outside of our CI. I've spun up a bunch of VMs of various operating systems and I only hit this edge case a fraction of the times I go through the motions

please update the dependency nan to 2.11.0 and give a go. I can see that's the only dependency in the stack is little bit behind and this 2.10.0 is having issues that are resolved in 2.11.0

Made a fork and updated the dependency

--> https://github.com/MylesBorins/node.bcrypt.js/tree/update-nan

Running the CITGM against that... if it is green then we have a solution

--> https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1534/

Will update this comment when I have results

edit: everything is looking green so far 🎉

I found a temporary solution to work with this problem.
I got the error when I was running the node on Node v8.11.
In bcrypt docs it is recommended to use Bcrypt v1.0.3 for Node x8.x.x

npm_bcrypt_version_compatibility

This works for me on AWS. I hope this should help you around.

:)

Solved by updating to [email protected] using Node v10.16.3.
Thanks so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raj9211 picture raj9211  Â·  3Comments

SpaceG picture SpaceG  Â·  4Comments

youngrrrr picture youngrrrr  Â·  5Comments

megmut picture megmut  Â·  6Comments

thorlacius picture thorlacius  Â·  4Comments