Before clearing cache
npm cache clear
npm is working fine. After clearing cache, it is not working. The error log below suggest problem wi
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