failure_id: dependency.lockfile_drift confidence: 0.91 evidence: - npm ci failed because the lockfile was out of sync - package.json and package-lock.json changed inconsistently suggested_fix: - regenerate the lockfile with npm install - commit package.json and package-lock.json together - add a guard to detect lockfile drift before CI
Evidence
- npm ci failed because the lockfile was out of sync
- package.json and package-lock.json changed inconsistently
Suggested fix
- Regenerate the lockfile with
npm install - Commit package.json and package-lock.json together
- Add a pre-commit hook or CI check to catch drift early
Why it happens
Developers update dependencies locally but commit only one of the two dependency files. The lockfile no longer reflects what package.json declares, and npm ci enforces strict lockfile consistency.