segunda-feira, 13 de março de 2017

npm install npm ERR! Error: EPERM: operation not permitted, rename

Opa :)

Ao dar um npm install tive o seguinte erro:

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\work\\Dropbox\\othertools\\node\\node.exe" "C:\\Users\\Adriano\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.6.0
npm ERR! npm  v3.9.3
npm ERR! path C:\work\Dropbox\workspaces\ws-ionic\k2\node_modules\.staging\tryit-8b241062\package.json.3684708665
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\work\Dropbox\workspaces\ws-ionic\k2\node_modules\.staging\tryit-8b241062\package.json.3684708665' -> 'C:\work\Dropbox\workspaces\ws-ionic\k2\node_modules\.staging\tryit-8b241062\package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\work\Dropbox\workspaces\ws-ionic\k2\node_modules\.staging\tryit-8b241062\package.json.3684708665' -> 'C:\work\Dropbox\workspaces\ws-ionic\k2\node_modules\.staging\tryit-8b241062\package.json']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\work\\Dropbox\\workspaces\\ws-ionic\\k2\\node_modules\\.staging\\tryit-8b241062\\package.json.3684708665',
npm ERR!   dest: 'C:\\work\\Dropbox\\workspaces\\ws-ionic\\k2\\node_modules\\.staging\\tryit-8b241062\\package.json',
npm ERR!   parent: 'my-app' }
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:\work\Dropbox\workspaces\ws-ionic\k2\npm-debug.log

Para resolver eu fiz duas coisas:
- rodei o comando "npm cache clean" (talvez esse passo não seja necessário, mas mal não faz)
- desativei temporariamente o antivírus (Avast)
e ao rodar novamente o "npm install" tudo funcionou perfeitamente!

Abraço!
Adriano Schmidt

Nenhum comentário:

Postar um comentário