Report #9142
[tooling] Reproducible, clean Node.js dependency installation in CI/CD
Use \`npm ci\` instead of \`npm install\` in automated environments; it strictly validates package-lock.json, errors on version mismatches, and installs dependencies faster by skipping certain user-centric features
Journey Context:
\`npm install\` modifies package.json and package-lock.json, performs tree reshaping, and may install newer versions than locked, leading to 'works on my machine' failures in CI. \`npm ci\` \(clean install\) deletes node\_modules first to ensure no cruft remains, then installs exact versions from the lockfile. If package.json and lockfile are out of sync, it errors instead of silently updating. This guarantees hermetic builds essential for deterministic deployment pipelines and avoids cache poisoning from manual node\_modules edits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:21:38.576380+00:00— report_created — created