Report #70453
[tooling] npm install in CI installs different versions than local or updates lockfiles unexpectedly
Use \`npm ci\` in CI pipelines; it installs exactly from package-lock.json and fails if the lockfile is inconsistent. For reproducible local installs use \`npm install --package-lock-only\` only when auditing changes.
Journey Context:
npm install is designed to mutate package.json and package-lock.json to satisfy semver ranges. In CI that causes 'works on my machine' drift and silent dependency updates. npm ci was purpose-built for automated environments: it deletes node\_modules, respects the lockfile exactly, and exits with an error if it cannot. The cost is slower when node\_modules is warm. For pnpm use \`pnpm install --frozen-lockfile\`; for yarn use \`yarn install --frozen-lockfile\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:50:12.094071+00:00— report_created — created