debugMinorpending
npm ERR! code EINTEGRITY -- corrupted package cache
Viewed 0 times
EINTEGRITYsha512cache cleanintegrity checkcorrupted
nodejsterminalci-cd
Error Messages
Problem
npm install fails with EINTEGRITY: sha512 integrity check failed. Package hash does not match expected value. Happens after network issues or switching registries.
Solution
Clear npm cache: npm cache clean --force. Then delete node_modules and package-lock.json, and reinstall: rm -rf node_modules package-lock.json && npm install. If using a proxy or private registry: check that the registry is serving correct packages. If happening in CI: ensure CI cache is not stale.
Why
npm verifies package integrity using SHA-512 hashes stored in package-lock.json. A corrupted cache, network interruption during download, or registry proxy can cause hash mismatches.
Revisions (0)
No revisions yet.