我试图在我的项目中运行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 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)
Im使用的是10.15.3节点版本和6.4.1 npm版本。
如何修复此错误?
发布于 2020-05-18 08:44:53
删除节点模块文件。然后使用sudo npm i bcrypt --save
手动安装bcrypt
。然后运行命令sudo npm i
。
如果这不起作用,请尝试不使用sudo
命令。
发布于 2020-05-18 08:50:23
因为它看起来是node gyp问题。首先在linux中安装build-essential
。
sudo apt-get install build-essential
之后,您需要安装python-dev
sudo apt-get install python-dev
就是这样,现在你需要重新安装你的bcrypt
包。
https://stackoverflow.com/questions/61865557
复制相似问题