NPM install prompts NPM ERR! Error code EINTEGRITY

There are a lot of solutions, about 4 types:

  1. NPM version problems can be degraded
npm install npm@4 -g
Copy the code
  1. Clear the NPM cache.
npm cache clean --force || npm cache clean || npm cache verify
Copy the code
  1. Reinstall NPM and execute this command
npm i -g npm
grep -ir "sha1-xxxxxxxxxxxxxxxx" ~/.npm
Copy the code

Grep is not a command, my goodness 😡. Forgive me for being a chicken.

  1. W10 (64) Node version: 10.18.0 NPM version: 6.13.4
rm -r package-lock.json node-modules && npm cache clean --force && npm instal
Copy the code

Why (sure?) : When downloading NPM packages, package hash detection is performed to prevent the downloaded packages from being maliciously tampered. This problem is caused by the mixing of CNPM and NPM. This removes the lock package each time install is installed, and can lead to changes being misreported. CNPM, NPM Is this the root cause? There has been mixed use in the project, there is no such problem 😭) great god ask for advice perfect solution 😂