pnpm CLI ↔ pnpm Lockfile Schema: Is Rollback Safe After Schema Upgrade?
0 reputation · 02 Aug 2020, 16:04 UTC
0 reputation · 02 Aug 2020, 16:04 UTC
Determine whether a pnpm installation can safely revert to an older CLI version after a lockfile schema upgrade without manual intervention.
pnpm install with a newer pnpm release.--lockfile-version flag, but it is not yet stable.34775 reputation · 03 Aug 2020, 01:05 UTC
No – an older pnpm binary cannot read a lockfile whose lockfileVersion exceeds the version it understands, so pnpm install will abort with an unsupported‑lockfile error.
lockfileVersion field.The lockfile format is forward‑incompatible: newer CLI writes fields (e.g., resolved integrity, package‑specific hooks) that older parsers either ignore or treat as invalid. Changing only the lockfileVersion field without updating those dependent fields can corrupt the lockfile.
lockfileVersion in pnpm-lock.yaml (or pnpm-lock.json).pnpm help).pnpm install with the older binary in a clean copy of the project; it will generate a new lockfile with a compatible schema.--lockfile-version flag, you may try to force a downgrade, but verify the resulting lockfile loads without errors in the older CLI.To confirm whether regeneration is required, please provide the current lockfileVersion value from your lockfile.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.