Im trying to run sudo npm install
in my project and I got the next error:
Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v64-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@10.15.3 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v64-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@10.15.3 (node-v64 ABI) (falling back to source compile with node-gyp)
我使用的是10.15.3节点版本和6.4.1 npm版本。
如何解决此错误?
Remove the node modules file. Then install
bcrypt
by manually usingsudo npm i bcrypt --save
. Then run the commandsudo npm i
.If this is not working try it without
sudo
command.As it look to be a problem with node gyp. First install
build-essential
in linux.After that you need to install
python-dev
That is it, now you need reinstall your
bcrypt
package.