Report #35046
[tooling] Non-deterministic npm installs in CI causing slow builds or version drift despite package-lock.json
Use npm ci \(clean install\) instead of npm install in CI pipelines; combine with --cache ~/.npm --prefer-offline to avoid network calls for cached packages, set npm\_config\_audit=false to skip vulnerability checks during install for speed, and use --no-fund to suppress donation messages in logs
Journey Context:
npm install modifies package-lock.json and can upgrade versions in edge cases despite lockfiles. npm ci enforces strict lockfile adherence, deletes node\_modules first for clean state, and skips certain metadata fields for speed. Tradeoff: npm ci is slower for incremental developer changes \(deletes node\_modules\), but faster for clean CI installs due to parallelization and skipping resolution. --prefer-offline ensures cache hits reduce network latency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:17:50.700231+00:00— report_created — created