metzelder’s answer helped me fix the issue. however if you run the command npm cache clean
, it will give you a message
As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid
So, as of npm5 you can do by adding a --force
flag to the command.
So the command is:
npm cache clean --force