The broken invariantThe store linked to the existing node_modules must equal the store selected for the current profile mutation.

Capture three identities.

Existing linksLinked store

Read the currently linked from path in the first error.

Current processSelected store

Read the now wants to use path and effective pnpm config.

Future invariantStable store

Choose one explicit location owned by the profile operator.

Recover without changing the graph.

PreserveStop writers and copy profile evidence.Keep both store paths until recovery is proven.
PinAdd one absolute store-dir.Prefer a DSH-owned or explicitly operator-owned location.
Relinkpnpm install --frozen-lockfileMove links without selecting new dependency versions.
Profile-level .npmrcApply this in the exact profile directory reported by DSH.
store-dir=/absolute/path/to/stable/dsh-pnpm-store

Repeat evidence proves stability.

  1. Profile store path equals the explicit location.
  2. Frozen relink exits zero with no resolution drift.
  3. The DSH-owned update exits zero.
  4. Manifest, lockfile, and bundle diffs are bounded.
  5. --dump-config and isolated boot succeed.
  6. A second no-op mutation selects the same store.

Do not merge neighboring failures.

ADDING_TO_ROOTTarget ambiguityOpen workspace-root guide
nonzero + files remainPartial transactionOpen reconciliation guide
missing dist/Build artifact gapOpen artifact guide
Loading pluginsClient boot failureOpen Web recovery

Primary evidence.

Keep the complete recovery runbook.

The canonical guide includes evidence capture, hard-link boundaries, unsafe shortcuts, runtime repair gates, and an incident template.

Read and star on GitHub