npm的permission問題

遇到問題

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\boo\AppData\Roaming\npm-cache\concat-map\0.0.1\package\package.json.12237d5421eab475588a272c2552fc32' -> 'C:\Users\boo\AppData\Roaming\npm-cache\concat-map\0.0.1\package\package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\Users\boo\AppData\Roaming\npm-cache\concat-map\0.0.1\package\package.json.12237d5421eab475588a272c2552fc32' -> 'C:\Users\boo\AppData\Roaming\npm-cache\concat-map\0.0.1\package\package.json']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\Users\\boo\\AppData\\Roaming\\npm-cache\\concat-map\\0.0.1\\package\\package.json.12237d5421eab475588a272c2552fc32',
npm ERR!   dest: 'C:\\Users\\boo\\AppData\\Roaming\\npm-cache\\concat-map\\0.0.1\\package\\package.json',
npm ERR!   parent: 'brace-expansion' }
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

google以後發現解決辦法

  1. 執行命令
npm cache clean

2.若是以上代碼沒有解決問題成功,那麼看一下這個目錄 %APPDATA%\npm-cache,手動清空這個目錄下的全部信息,以後若是仍是有問題的話,就繼續google把,或者留言給我也能夠json

相關文章
相關標籤/搜索