【发布时间】:2016-09-19 07:36:37
【问题描述】:
我有 node 和 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 文件夹
然后是sails文件夹...
但后来 .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 ..但仍然没有结果...我一定是错过了什么让我知道..
【问题讨论】: