Report #104469
[bug\_fix] npm ERR\! code EINTEGRITY
Clear the npm cache with \`npm cache clean --force\` and delete \`node\_modules\` and \`package-lock.json\`. Then run \`npm install\` again. If that fails, also try \`npm cache verify\` to detect corruption. For persistent issues, temporarily disable integrity checks with \`--no-optional --lockfile-version 2\` or use an older npm version.
Journey Context:
After a network interruption during an \`npm install\`, subsequent installs failed with \`npm ERR\! code EINTEGRITY\` saying 'sha512-... integrity checksum failed when using sha512: wanted sha256-... got sha512-...'. I assumed it was a mirror issue, but even switching to the official registry failed. Running \`npm cache clean --force\` did not help initially, but after deleting both \`node\_modules\` and \`package-lock.json\` and then clearing the cache, the install succeeded. The root cause is that npm caches package tarballs and verifies their integrity via the package-lock.json or registry \`\_shasum\`. A corrupted cache \(due to partial download or disk error\) caused the checksum mismatch. Clearing the cache forces npm to re-download packages, restoring integrity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-23T20:04:57.103583+00:00— report_created — created