Replies: 1 comment
|
I turned this report into a source-backed operator runbook with one additional safety constraint: relink the recorded graph with The guide separates the linked, selected, and stable store identities; includes CLI-versus-Web environment evidence; and requires a second no-op mutation to prove the store decision is durable: https://sandbaseai.github.io/deepseek-harness-handbook/pnpm-unexpected-store.html Canonical runbook and regression gates: If the proposed |
Uh oh!
There was an error while loading. Please reload this page.
dsh plugin updatefails withERR_PNPM_UNEXPECTED_STORE— pnpm store location drifts between install and updateSummary
Running
dsh plugin --profile web update(the Web UI "update" flow) can fail with:The profile installs fine the first time, then a later update fails because pnpm resolves a different store location than the one
node_moduleswas originally linked from.Root cause
dsh pluginis a thin pnpm forwarder (apps/cli/src/plugin.ts→runPlugin) and does not pinstore-dir. Starting with pnpm v10, pnpm resolves its content-addressable store location dynamically (store-path/getStorePath):$PNPM_HOME, the store is$PNPM_HOME/store/<version>.<mount-point>/.pnpm-store/<version>.That hard-link probe is environment-sensitive — it flips depending on whether the process can hard-link into
$PNPM_HOME(sandboxes, filesystem layout, whether$PNPM_HOMEexists/writable, permissions). So the same profile directory can be:<mount-point>/.pnpm-store/v10), then$PNPM_HOME/store/v10),and pnpm then refuses with
ERR_PNPM_UNEXPECTED_STOREbecause the store it now wants no longer matches the onenode_moduleswas linked from.Reproduction
$DSH_HOMEon a different device, or$PNPM_HOMEnot yet present). The store lands at<mount-point>/.pnpm-store/v10.dsh plugin --profile web updatein an environment where the probe succeeds. pnpm now wants$PNPM_HOME/store/v10.ERR_PNPM_UNEXPECTED_STORE.Confirmed on macOS with pnpm 10.33.1:
pnpm store pathreturns<cwd>/.pnpm-store/v10when the hard-link probe is blocked and$PNPM_HOME/store/v10when it is not.Proposed fix
Pin
store-dirto a stable location under the DSH home so install and update always agree, and hand it to pnpm throughnpm_config_store_dir(how pnpm reads npm-style config from the environment; a user's explicit--store-dirstill wins).Notes for maintainers:
@deepseek-ai/dsh-home-pathsis already a direct dependency ofapps/cli, so no manifest change is needed.pnpm install/update(pnpm's own error message already tells users to runpnpm install).Workaround for affected users
Pin the store at the profile level so pnpm stops guessing, e.g. create
<profile-dir>/.npmrcwith:store-dir=/absolute/path/to/stable/storethen run
pnpm installonce from the profile directory to relinknode_modules, and the update will succeed afterwards.All reactions