Report #103408
[bug\_fix] YN0028: The lockfile would have been modified by this install
Run \`yarn install\` with the same Yarn version that generated \`yarn.lock\`, and do not use \`--immutable\` \(or \`--frozen-lockfile\` in Yarn 1\) unless you intend to fail on any lockfile change. If the lockfile is genuinely outdated, run \`yarn install\` normally \(without immutable mode\) to update it, then commit the updated lockfile. Root cause: Yarn Berry/PnP runs with \`--immutable\` by default in CI and aborts when the lockfile does not exactly match the requested dependency ranges.
Journey Context:
A developer runs \`yarn install\` in CI and sees \`YN0028\`. Locally it works because the local Yarn is not in immutable mode. They check the lockfile and find a colleague updated a dependency in \`package.json\` without committing the matching \`yarn.lock\`. They run \`yarn install\` locally without \`--immutable\`, Yarn updates the lockfile, and they commit both files. On the next CI run the lockfile matches the manifest and the install succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:21:09.558126+00:00— report_created — created