I am getting this error while running sudo npm install. On my server, npm was installed earlier. I\'ve tried to delete the package-lock.json file,
There are several valid and helpful responses here, but I would like to add that in my case the simplest solution was:
After that everything ran smoothly.