在sails js难度上安装'bcrypt'

时间:2018-03-18 19:40:10

标签: node.js npm sails.js bcrypt

我尝试在sails js上安装bcrypt,但出现以下错误

$ npm install bcrypt npm ERR! path C:\Users\User\AppData\Roaming\npm\node_modules\sails\node_modules\concat-stream\node_modules\readable-stream npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\User\AppData\Roaming\npm\node_modules\sails\node_modules\concat-stream\node_modules\readable-stream' -> 'C:\Users\User\AppData\Roaming\npm\node_modules\sails\node_modules\concat-stream\node_modules\.readable-stream.DELETE' 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! C:\Users\User\AppData\Roaming\npm-cache\_logs\2018-03-18T19_20_51_652Z-debug.log

我已经使用下面的成功安装了它的依赖项。

npm install -g node-gyp npm install --g --production windows-build-tools

我需要帮助才能解决问题

1 个答案:

答案 0 :(得分:0)

您需要安装

sudo apt-get install build-essential python2.7

sudo apt install build-essential

然后运行

npm install bcrypt