为什么在运行npm install时为什么在bcrypt中出现错误404?

问题描述 投票:0回答:2

我试图在我的项目中运行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版本。

如何解决此错误?

node.js linux npm bcrypt
2个回答
0
投票

删除节点模块文件。然后使用bcrypt手动安装sudo npm i bcrypt --save。然后运行命令sudo npm i

如果不起作用,请尝试不使用sudo命令。


0
投票

似乎是节点gyp的问题。首先在Linux中安装build-essential

sudo apt-get install build-essential

此后您需要安装python-dev

sudo apt-get install python-dev

就是这样,现在您需要重新安装bcrypt软件包。

© www.soinside.com 2019 - 2024. All rights reserved.