I\'ve been desperately trying to install modules using node.js but it always fails getting packages with npm.
I logged in as Administrator and used powershell/cmd wi
What helped me on Windows 10 was just ticking off "Read Only" of project node_modules
.
I had to login into npm to resolve this issue.
npm login
If you are doing this on mac type: sudo chown -R $USER /usr/local that will give you administrative access to your files
$ npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
I tried running npm cache verify
with admin rights and it worked after that.
You should run cmd.exe as administrator.
Follow the following steps:
I don't know which steps worked for me. But these are my steps to get rid of this error: