无法安装sails.js

时间:2016-09-19 07:36:38

标签: node.js npm sails.js

我有节点和npm版本:

C:\Windows\system32>node -v
v4.5.0

C:\Windows\system32>npm -v
3.10.6

我尝试将sails.js安装为管理员

npm install -g sails

在C:\ Program Files \ nodejs \ node_modules \ 它创建了一个.staging文件夹 然后航行文件夹... 但是后来再次.staging文件夹被自动删除了...... 在管理员控制台日志以此错误结束...

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sjammulamada\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\
npm-cli.js" "install" "-g" "sails"
npm ERR! node v4.5.0
npm ERR! npm  v3.10.6
npm ERR! path C:\Program Files\nodejs\node_modules\.staging\lodash-86452639
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Program Files\nodejs\node_modules\.staging\lodash-86452639' ->
'C:\Program Files\nodejs\node_modules\sails\node_modules\anchor\node_modules\lodash'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Program Files\nodejs\node_modules\.staging\lodash-86452639' ->
'C:\Program Files\nodejs\node_modules\sails\node_modules\anchor\node_modules\lodash'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Windows\system32\npm-debug.log
npm ERR! code 1

我试过了

npm cache clean

然后尝试安装sails.js ..但仍然没有结果......我一定是想念的东西让我知道..

1 个答案:

答案 0 :(得分:0)

您应该以管理员身份运行命令行,然后

npm cache clean

现在您已准备好安装sailsjs

npm install -g sails

如果仍然有问题,那么你可以试试

npm install -g sails --ignore-scripts