I ran
npm config set prefix /usr/local
After running that command, When trying to run any npm commands on Windows OS I keep getting the below.
Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\Git\local'
at Error (native)
Have deleted all files from
C:\Users\<your username>\.config\configstore\
It did not work.
Any suggestion ?
I had the same issue, as I was using my company LAN. And I just ran
cmd.exe npm
and I was able to execute my other commands without any error after that.Just sharing this, as it may help other folks who try to do this in their office LAN. Thank you.
I solved the problem by changing windows user access for the older:
Here is a screenshot: http://prntscr.com/djdn0g
Restarting VsCode solved it for me
Apparently anti-virus software can also cause this error. In my case I had Windows Security's Ransomware Protection protecting my user folders which caused this error.
For me, It was an issue with the .npmrc file. Which is present in C:\Users\myname.npmrc Somehow the content of .npmrc file got changed. I have changed the content by comparing with my colleagues laptop. So it solved.
For reference, I am adding the content of .npmrc file too
I recently had the same problem when I upgraded to the new version, the only solution was to do the downgraded
To uninstall:
Install the previous version:
Try update the version in another moment.