pnpm Upgrade Failure: Lockfile vs Global Store Consistency
0 reputation · 27 Sept 2021, 19:54 UTC
pnpm Upgrade Failure: Lockfile vs Global Store Consistency
The goal is to understand how pnpm behaves when an upgrade operation is interrupted and the lockfile becomes partially updated while the global store remains intact. The main uncertainty is whether pnpm offers any automatic rollback mechanism that restores the lockfile to its pre‑upgrade state or whether the user must manually revert changes from version control.
Key constraints include the content‑addressable global store (~/.pnpm-store), the current pnpm version, and the presence of a corrupted or partially applied pnpm-lock.yaml. The question is whether the tool can reconcile these components without manual cleanup.
1. Does pnpm automatically roll back the lockfile when an upgrade fails mid‑process?
2. If the lockfile is partially updated, can a subsequent pnpm install reconcile node_modules without manual intervention?
3. Are there pnpm flags or configuration options that enable transactional upgrades or automatic lockfile rollback?