我试图在我的项目中运行sudo npm install
,但出现下一个错误: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 [email protected] and [email protected] (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 [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
我正在使用10.15.3节点版本和6.4.1 npm版本。
如何解决此错误?
删除节点模块文件。然后使用bcrypt
手动安装sudo npm i bcrypt --save
。然后运行命令sudo npm i
。
如果不起作用,请尝试不使用sudo
命令。
似乎是节点gyp的问题。首先在Linux中安装build-essential
。
sudo apt-get install build-essential
此后您需要安装python-dev
sudo apt-get install python-dev
就是这样,现在您需要重新安装bcrypt
软件包。