node.bcrypt.js: Bcrypt not installing | Throwing 404 for the referred resource in npm
I am on CentOS Linux System v7.2, running Node v7.6.0 and NPM v4.4.4.
I am trying to install Bcrypt using sudo npm install brcypt but on the step node-pre-gyp install --fallback-to-build is called, it throws:
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz
Not even opening in browser, hence this release-resource is certainly not available. But it is defined in some of the code. Some help really appreciated.
(Please find attached the screenshot)

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 16
- Comments: 20
Just a note for anyone that reads the above. While bcryptjs has the same API surface on the JS side; it does not actually implement background work in the same way as the c++ bindings. The c++ bindings use a background thread pool while bcryptjs will block your main thread pool. This may have implications on your services so make sure you understand what you are doing and how it will impact your services before blindly switching dependencies.
I’m on arch linux, so I installed python2, g++, make and npm install bcrypt, but it still didn’t work (still got the same 404 error, so I’m not sure how that fixes the problem…), so I downgraded node.js to its LTS version and now it’s working. thank you 😃
@strugee This is not an error with the library, but rather node-gyp See https://github.com/nodejs/node-gyp/issues/454
This happens if your script is executing at root. npm refuses to run as root and performs actions as the
nobodyuser. As per @karimcitoh’s report above:I have all the necessary dependancies.
Funny thing, cloning repository, checking
v1.0.2and building works perfectly:But
npm install bcrypt@^1.0.2doesn’t seem to work: