npm失败,代码EPERM错误-4048

时间:2017-07-19 21:16:07

标签: npm

当我在项目中运行'npm install'时,出现以下故障。 我尝试手动删除目录'C:\ Users \ sacheu \ AppData \ Roaming \ npm-cache'但我仍然收到以下错误我在管理模式下运行'cmd'。

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! path C:\Users\sacheu\AppData\Roaming\npm-cache\source-map\0.5.6\packag
.tgz.1001138336
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\sacheu\AppData
Roaming\npm-cache\source-map\0.5.6\package.tgz.1001138336' -> 'C:\Users\sacheu\
ppData\Roaming\npm-cache\source-map\0.5.6\package.tgz'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, rename 'C:\Users\sacheu\AppD
ta\Roaming\npm-cache\source-map\0.5.6\package.tgz.1001138336' -> 'C:\Users\sach
u\AppData\Roaming\npm-cache\source-map\0.5.6\package.tgz'
npm ERR!     at Error (native)
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\Users\\sacheu\\AppData\\Roaming\\npm-cache\\source-map\\0
5.6\\package.tgz.1001138336',
npm ERR!   dest: 'C:\\Users\\sacheu\\AppData\\Roaming\\npm-cache\\source-map\\0
5.6\\package.tgz' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     c:\Users\sacheu\odsp-next\npm-debug.log

0 个答案:

没有答案