Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install -g nrm fails on Windows: "Error: EPERM: operation not permitted, rename" #28

Closed
Eric-art-coder opened this issue Dec 12, 2016 · 3 comments

Comments

@Eric-art-coder
Copy link

$ npm install -g nrm
C:\Users\lenovo\AppData\Roaming\npm
`-- (empty)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "E:\Program Files\nodejs\node.exe" "E:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "nrm"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! path C:\Users\lenovo\AppData\Roaming\npm\node_modules\nrm\node_modules\npm\node_modules\node-gyp\node_modules\minimatch\node_modules\brace-expansion
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\lenovo\AppData\Roaming\npm\node_modules\nrm\node_modules\npm\node_modules\node-gyp\node_modules\minimatch\node_modules\brace-expansion' -> 'C:\Users\lenovo\AppData\Roaming\npm\node_modules\nrm\node_modules\npm\node_modules\node-gyp\node_modules\minimatch\node_modules.brace-expansion.DELETE'
npm ERR! at moveAway (E:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR! at destStatted (E:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
......
npm ERR! at Error (native) parent: 'minimatch' }
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\lenovo\Desktop\npm-debug.log
npm ERR! code 1

BUT! on git bash run cli npm cache clean,it works

@wujr5
Copy link

wujr5 commented Dec 12, 2016

It looks like you should run the command as root. @guimeisang

@PrescottPS
Copy link

PrescottPS commented Dec 31, 2016

try this:

  • disabling Windows Defender or your anti-virus
  • run the NodeJs command prompt as administrator
  • run npm cache clean

@ErikRobles
Copy link

@wujr5 I think this is my problem as well. Can you give an example of using root. Thank you.

@EmilyMew EmilyMew closed this as completed Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants