Npm stopped working, npm install dont work

Npm stopped working, npm install dont work
0

#1

Hi, my npm has stopped working. I reinstalled node and deleted node_modules folder and tried to run “npm install” command and it says
ERROR “sha512-YZotALyZD1xJixB8pNOKqBpmxV/NrOpMHQ3l7/CMB1hn5U7KRSviaeyv8/1MT7/rTgEFPOW85mdaFKFr2EfeAw== integrity checksum failed when using sha512: wanted sha512-YZotALyZD1xJixB8pNOKqBpmxV/NrOpMHQ3l7/CMB1hn5U7KRSviaeyv8/1MT7/rTgEFPOW85mdaFKFr2EfeAw== but got sha512-qOBOtp4vM2cf7NdCiUjnvLp7thkR43HUzrIO1HwknT6fj8D8Nc6IjtTqUS1WAYq8n6axCVB8GFGMptaY6ic/kw==. (178754 bytes)”.

Complete log: https://www.scribd.com/document/383017992/2018-07-02T07-22-59-541Z-debug


#2

It’s not likely to be NPM itself, it is likely to be a specific package.

npm cache verify will work in many cases.

If not

  • Delete node_modules.
  • Delete the package.lock file in the directory.
  • Upgrade npm (npm install -g npm)
  • Try installing again

May work.

However, if a specific package is messed up, then it might still fail. The solution is to find that package, remove it from package.json, install all the good packages and then add the bad one back in, but install from GitHub rather than NPM, which bypasses the integrity check. I know how to do find the package/s on Mac/Linux (grep -ir "sha512-XXXXXXX" ~/.npm, which is going to search the logs to find the package/s with the issues), not sure on With if grep isn’t available. Your log that you posted might have that info in, but the file link you posted isn’t accessible (I get a 404)


#3

Okay, the file link should be okay now. The command “npm cache verify” did not help.