Before clearing cache
npm cache clear
npm is working fine. After clearing cache, it is not working. The error log below suggest problem wi
Try npm cache clean --force
if it doesn't work then manually delete %appdata%\npm-cache folder.
and install npm install npm@latest -g
It worked for me.
visit this link
I solved this issue by running cmd as an administrator. before that, I was trying to run in vs code.
run it in Power Shell or Cmd with administrative privilege. I hope that it will help.
npm install –g @angular/cli@latest
It should be
npm cache clean
See https://docs.npmjs.com/cli/cache.html
I try to
npm cache clean
But npm said newer version on npm (> 5) has self healing Mechanism and every thing i need to do for checking npm is use verify
npm cache verify
npm message :
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.
but for forcing npm use this:
npm cache clean --force
Try npm cache clean --force
if it doesn't work then manually delete %appdata%\npm-cache
folder.
It worked for me.