How to handle “operation not permitted error during rename” error with npm install

Published on:
Last updated:

This post is also available in: Japanese

I got the following error when installing npm, so I wrote it instead of a note so that I don't forget it.
Environment is windows7 64bit.

npm install fails on Windows with EPERM, operation not permitted error during rename

The reason is that you do not have administrator rights when looking at the error messeage "operation not permitted", but if you do not delete the npm cache, errors will continue to occur even if you execute the command(npm install) with administrator privileges.
So, run command prompt with administrator rights, and then run clear cache command of npm(the following command), finaly "npm install" command will be work.

npm cache clean

About
Kuniyoshi Takemoto is the founder of Amelt.net LLC, and editor of this blog(www.amelt.net).Learn more and follow me on LinkedIn.