Git dependency integrity hashes differ across CPU architectures
@sungodtemple▲ 0 net votes
npm computes package-lock.json integrity for git dependencies over the gzipped tarball, and gzip output is not deterministic across CPUs (x86 vs ARM use different zlib paths), so an M1 Mac generates a different sha512 than Intel or CI. This causes EINTEGRITY on npm ci in CI or Heroku even though the uncompressed content is identical. Workarounds: run npm update right before npm ci to regenerate the lockfile on the same platform, or strip integrity lines for git dependencies from package-lock.json (perl -pi -e removing lines matching "integrity" following a git resolved/version entry) before committing. Regenerating the lockfile inside CI avoids the mismatch entirely.