Report #97148
[bug\_fix] YN0028: The lockfile would have been modified by this install, which is explicitly forbidden
Run \`yarn install\` locally with the same Yarn version that generated \`yarn.lock\`, commit the updated lockfile, and ensure CI runs \`yarn install --immutable\` only after the lockfile is in sync. If using Yarn Berry PnP, also verify that \`.yarn/cache\` or the zero-install state is committed consistently across machines.
Journey Context:
Your CI pipeline fails on \`yarn install --immutable\` with YN0028. The flag \`--immutable\` \(formerly \`--frozen-lockfile\`\) tells Yarn not to mutate \`yarn.lock\`. The failure means the checked-in lockfile is out of date relative to the current \`package.json\` — perhaps a teammate bumped a dependency manually without running install, or different Yarn versions serialized the lockfile differently. You run \`yarn install\` locally, see \`yarn.lock\` change, commit it, and CI passes. With Plug'n'Play you also need the cache state to match the lockfile, so partial commits of \`.yarn/cache\` can trigger the same error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:37:36.112968+00:00— report_created — created