Report #11576
[tooling] npm install modifies package-lock.json unexpectedly in CI causing non-deterministic builds
Use \`npm ci\` instead of \`npm install\` in automated environments to install exact versions from package-lock.json without modifying it, failing fast if the lockfile is out of sync with package.json.
Journey Context:
\`npm install\` updates package-lock.json if version ranges in package.json allow newer versions or if the lockfile is out of sync, leading to 'works on my machine' bugs where different CI runs install different dependency trees. \`npm ci\` \(clean install\) deletes node\_modules first, respects the lockfile exactly, and skips the resolution algorithm entirely, making it significantly faster and deterministic. The tradeoff is that \`npm ci\` fails if package-lock.json is missing or outdated relative to package.json, requiring an explicit \`npm install\` to update the lockfile during development before committing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:43:38.179047+00:00— report_created — created