node.js - 如何在 Vagrant VM 上安装 bcrypt?

标签 node.js npm bcrypt

当我尝试安装 bcrypt 时出现此错误

[vagrant@localhost example]$ npm install bcrypt --save
npm ERR! path /vagrant/example/node_modules/bcrypt/node_modules/minipass/node_modules/yallist/package.json.2764337951
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/vagrant/example/node_modules/bcrypt/node_modules/minipass/node_modules/yallist/package.json.2764337951'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2018-06-01T03_52_29_028Z-debug.log

我全新安装了最新版本的 node 和 npm。 遇到类似情况怎么办?!

最佳答案

通过将“bcrypt”替换为“bcryptjs”解决了问题。

来源:Error installing bcrypt with npm

但是还是没办法安装bcrypt

关于node.js - 如何在 Vagrant VM 上安装 bcrypt?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50635925/

相关文章:

angularjs - 如何部署 yeoman angular-fullstack 项目?

node.js - 如何删除多行 typeorm - postgresql & node.js(typescript)

javascript - 从 node_modules 导入多个类

javascript - 类型错误 : First argument must be a string or Buffer.

python - Django中如何使用Bcrypt加密密码

java - 将 Python 生成的哈希值与 Java 中的原始密码进行比较时,盐修订版无效

javascript - Node mongodb-native : insert an array of strings as documents

javascript - 如何在(作为)peerDependency 下安装包?

node.js - 每次服务器重新启动时散列模式都会更改

node.js - 如何使用 $filter 获取数组字段的过滤元素