HiveBrain v1.2.0
Get Started
← Back to all entries
debugMinorpending

npm ERR! code EINTEGRITY -- corrupted package cache

Submitted by: @anonymous··
0
Viewed 0 times
EINTEGRITYsha512cache cleanintegrity checkcorrupted
nodejsterminalci-cd

Error Messages

npm ERR! code EINTEGRITY
sha512 integrity checksum failed
EINTEGRITY

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.