Skip to content
Latchkey

Rush "shrinkwrap is out of date / rush update" needed in CI

Rush install verifies that the committed shrinkwrap (lockfile) matches the project package.json files. When a dependency changed without running rush update, the lockfile is out of date and rush install refuses to proceed in CI.

What this error means

A rush install step fails with "The shrinkwrap file is out of date. You need to run \"rush update\"" or reports that a project's dependencies do not match the lockfile.

Rush
ERROR: The shrinkwrap file is out of date. You need to run "rush update".

Common causes

A dependency changed without rush update

A project package.json was edited but rush update was not run, so the committed shrinkwrap no longer matches.

The shrinkwrap was not committed

The lockfile under common/config/rush was regenerated locally but not committed alongside the manifest change.

How to fix it

Run rush update and commit the lockfile

  1. Run rush update locally to refresh the shrinkwrap.
  2. Commit the updated lockfile under common/config/rush.
  3. Re-run CI so rush install matches.
Terminal
rush update
git add common/config/rush

Verify in CI with rush install

Keep rush install (not rush update) in CI so drift fails fast instead of silently relocking.

Terminal
node common/scripts/install-run-rush.js install

How to prevent it

  • Run rush update whenever a project's dependencies change.
  • Commit the regenerated shrinkwrap with the manifest edit.
  • Use rush install in CI to catch out-of-date lockfiles.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →