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.
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
- Run
rush updatelocally to refresh the shrinkwrap. - Commit the updated lockfile under
common/config/rush. - Re-run CI so
rush installmatches.
rush update
git add common/config/rushVerify in CI with rush install
Keep rush install (not rush update) in CI so drift fails fast instead of silently relocking.
node common/scripts/install-run-rush.js installHow to prevent it
- Run
rush updatewhenever a project's dependencies change. - Commit the regenerated shrinkwrap with the manifest edit.
- Use
rush installin CI to catch out-of-date lockfiles.