[Solved] bcrypt fails at the install script at node-gyp rebuild
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!
@defunctzombie why was this closed?
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.
I have the same issue. Shame to to see it getting closed without a conversation. Thanks for the info @conor909.
@andrewjmead I just had to edit my previous comment, it's not the same api, you'll need to update your code.
I've been trying to solve this for hours...
Finally working! Thank you @conor909 for the help, your solution worked for me.
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
@conor909 you f**ing life saver man I almost died whole day trying to solve this shit. I love you so much <3.
Spent 5 hours trying to get bcrypt to work. SO MUCH THANX HACKER!
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"
You need to install with npm version 3: https://github.com/RocketChat/Rocket.Chat/issues/5210
npm install -g npm@3
Thanks to tanc. I'm installing kibana4.5 and was getting hung on the bcrypt dependency. npm install -g npm@3 worked for me.
@conor909 Thumbs up, smiley, party, and heart for you!
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
Horrible that this is an one year old issue and is still out there causing pain (Y)
Still causes issues in 2018
@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
I had the same error and verified that I was using node10, I changed via nvm to node9 and it worked
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 :))
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.
migrated to https://www.npmjs.com/package/bcryptjs and now everything is working