node.bcrypt.js icon indicating copy to clipboard operation
node.bcrypt.js copied to clipboard

[Solved] bcrypt fails at the install script at node-gyp rebuild

Open conor909 opened this issue 10 years ago • 88 comments

I get the folowing errors when trying to run npm install with "bcrypt": "^0.8.6" as a devDependency

error [email protected] install: `node-gyp rebuild`
error Exit status 1
error Failed at the [email protected] install script.
error This is most likely a problem with the bcrypt package,
error not with npm itself.
error Tell the author that this fails on your system:
error     node-gyp rebuild
error You can get their info via:
error     npm owner ls bcrypt
error There is likely additional logging output above.
error System Windows_NT 10.0.10586
error command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
error cwd C:\Users\username\Documents\my-app
error node -v v4.2.4
error npm -v 1.4.3
error code ELIFECYCLE
verbose exit [ 1, true ]

Thanks!

conor909 avatar Jul 01 '16 08:07 conor909

@defunctzombie why was this closed?

conor909 avatar Jul 04 '16 09:07 conor909

For anyone else struggling with this: http://stackoverflow.com/questions/29320201/error-installing-bcrypt-with-npm

I'm now using the bcrypt-nodejs library. npm install --save bcrypt-nodejs && npm uninstall --save bcrypt

I've been using it without any issues for a while now.

conor909 avatar Jul 05 '16 20:07 conor909

I have the same issue. Shame to to see it getting closed without a conversation. Thanks for the info @conor909.

andrewjmead avatar Aug 04 '16 21:08 andrewjmead

@andrewjmead I just had to edit my previous comment, it's not the same api, you'll need to update your code.

conor909 avatar Aug 05 '16 08:08 conor909

I've been trying to solve this for hours...

Finally working! Thank you @conor909 for the help, your solution worked for me.

bmorelli25 avatar Aug 10 '16 14:08 bmorelli25

Thanks Conor

I had issue

https://forums.meteor.com/t/another-mup-failed-deployed-any/29277

and now this solved it for me:

$npm install --save bcrypt-nodejs && npm uninstall --save bcrypt

scheung38 avatar Sep 13 '16 13:09 scheung38

@conor909 you f**ing life saver man I almost died whole day trying to solve this shit. I love you so much <3.

shashidharhr avatar Sep 17 '16 16:09 shashidharhr

Spent 5 hours trying to get bcrypt to work. SO MUCH THANX HACKER!

iamdarknight avatar Sep 19 '16 19:09 iamdarknight

I think your file in newproject/mean/module 3/start/app.js on line 17 is trying to import or require bcrypt. If that's the case change "bcrypt" to "bcrypt-nodejs"

conor909 avatar Oct 05 '16 07:10 conor909

You need to install with npm version 3: https://github.com/RocketChat/Rocket.Chat/issues/5210 npm install -g npm@3

tanc avatar Jan 11 '17 08:01 tanc

Thanks to tanc. I'm installing kibana4.5 and was getting hung on the bcrypt dependency. npm install -g npm@3 worked for me.

fp5885 avatar Feb 21 '17 15:02 fp5885

@conor909 Thumbs up, smiley, party, and heart for you!

adammoisa avatar May 07 '17 16:05 adammoisa

on mac os following solution worked for me Install Xcode Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

sources https://github.com/nodejs/node-gyp/issues/569

arorashivani avatar Jun 01 '17 07:06 arorashivani

Horrible that this is an one year old issue and is still out there causing pain (Y)

azarus avatar Jun 08 '17 17:06 azarus

Still causes issues in 2018

hofman-p avatar Jun 14 '18 13:06 hofman-p

@hofman-p This happens if your machine is incorrectly setup. We have comprehensive installation instructions https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions

Please read them before opening an issue, if it is an obvious case, the issue will be closed without any information, or a link at most depending on the maintainers' mood

recrsn avatar Jun 14 '18 15:06 recrsn

I had the same error and verified that I was using node10, I changed via nvm to node9 and it worked

eduarduo avatar Jun 29 '18 16:06 eduarduo

My solution: 1)Go to visual studio code 2)Open package.json 3)Delete bcrypt dependency from package.json 4)Now open terminal and run npm install bcrypt 5)Restart visual studio code(Always a good practice if things not working :))

DeepakDonde avatar Aug 06 '18 11:08 DeepakDonde

I followed all of the installation instructions at the above link using node 10 and Ubuntu 18.04 and am still having errors building bcrypt.

aardvarkk avatar Sep 26 '18 04:09 aardvarkk

migrated to https://www.npmjs.com/package/bcryptjs and now everything is working

sayhicoelho avatar Sep 30 '18 21:09 sayhicoelho