npm ERR! Error: EPERM: operation not permitted

  • 分类:【工具使用
  • 浏览【851】
  • 评论【0】
  • 更新【2017-6-28 12:01:54】

windows下npm install安装依赖的时候出现下面的错误:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "yog2@1.0.0"
npm ERR! node v4.8.0
npm ERR! npm  v2.15.11
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm-cache\images\3.0.0\package.tgz.1683947925
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Administrator\AppData\Roaming\npm-cache\images\3.0.0\package.tgz.1683947925' -> 'C:\Users\Administrator\AppData\Roaming\npm-cache\images\3.0.0\package.tgz'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\Users\Administrator\AppData\Roaming\npm-cache\images\3.0.0\package.tgz.1683947925' -> 'C:\Users\Administrator\AppData\Roaming\npm-cache\images\3.0.0\package.tgz']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\Users\\Administrator\\AppData\\Roaming\\npm-cache\\images\\3.0.0\\package.tgz.1683947925',
npm ERR!   dest: 'C:\\Users\\Administrator\\AppData\\Roaming\\npm-cache\\images\\3.0.0\\package.tgz',
npm ERR!   parent: 'fis-spriter-csssprites' }
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!     E:\workspace\zm-platform\npm-debug.log

解决方案:npm cache clear 详细参阅:Fixing intermittant 'EPERM: operation not permitted' on npm install

关键字词:operation not permitted