npm ERR! code EINTEGRITY — sha512 integrity checksum failed
A downloaded package’s hash doesn’t match the integrity value in package-lock.json — a corrupted cache, a changed tarball, or a lockfile from a different registry.
integrity checksum failednpm ERR! code EINTEGRITY Meaning
npm verifies every tarball against the lockfile’s integrity field. Mismatches come from a corrupted local cache, a registry mirror serving different tarballs, or lockfiles edited/merged incorrectly.
Common causes
- Corrupted npm cache
- Lockfile generated against a different registry/mirror
- Bad merge in package-lock.json
- Proxy modifying downloads
⚡ Quick fix
npm cache verify(ornpm cache clean --force)- Delete node_modules and reinstall with
npm ci - Regenerate the lockfile if it was hand-merged
- Use the same registry for everyone (commit
.npmrc)
Detailed fix by platform
npm
- Clean and reinstall:bash
npm cache verify rm -rf node_modules npm ci
How to diagnose
- Package — Which tarball fails?
- Registry — Same registry as the lockfile?
- Cache — Does a clean cache fix it?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in npm
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026