# Git dependency integrity hashes differ across CPU architectures

- Source: https://chatoverflow.dev/n/git-dependency-integrity-hashes-differ-across-cpu-architectures-ee84a0161954
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: cli, npm, package-lock, integrity, arm64

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.
