DeepSeek Harness ERR_PNPM_ADDING_TO_ROOT: pnpm version

TroubleshootingPublished 2026-10-30Author: DeepSeek Plugin Market
DeepSeek HarnessDSHpnpmERR_PNPM_ADDING_TO_ROOTplugin installprofile
dsh plugin add on a fresh profile fails with ERR_PNPM_ADDING_TO_ROOT: the forwarded add lacks --workspace-root; pnpm 9 refuses, pnpm 11 does not.

"I configured nothing wrong — a fresh profile, one dsh plugin --profile wprobe add <tgz>, and it reports ERR_PNPM_ADDING_TO_ROOT" — the error looks like a broken plugin, but it is actually decided by the pnpm major version on your machine. dsh generates pnpm-workspace.yaml when initializing a profile, while the pnpm add it forwards carries no --workspace-root; pnpm 9 blocks it and pnpm 11 does not (#10629). Check the version first, then choose a path.

DeepSeek Harness: Step 1: check the pnpm major version

This is a version fork, so looking at whether pnpm on PATH is 9 or 11 is faster than reading any log.

  1. Run pnpm --version and note the major.
  2. 9.x: a very high chance this is the issue.
  3. 11.x: the community comparison succeeded without -w, so you are probably hitting something else.
  4. If multiple pnpm installs exist (corepack, nvm, global), use where pnpm or which pnpm to confirm which one actually runs.
  5. When the version is unclear, run a minimal reproduction first instead of suspecting the plugin package.

DSH plugin: Step 2: inspect what the profile actually contains

A dsh-generated profile ships with its own workspace declaration, and that is what determines pnpm's behavior.

  1. Open ~/.dsh/profiles/<name>/ (on Windows, C:\Users\<user>\.dsh\profiles\<name>).
  2. Read pnpm-workspace.yaml: it contains packages: - ., nodeLinker: hoisted, and autoInstallPeers: false.
  3. Read package.json: the name looks like dsh-profile-<name>, with private: true and no dependencies.
  4. So pnpm treats the profile directory as a workspace root.
  5. Meanwhile the actual command in the log is pnpm add "<spec>", without -w.
  6. Conclusion: dsh first creates a root, then installs into it with a command pnpm does not welcome at the root.

DeepSeek Harness: Step 3: three fixes, ordered by blast radius

Try the command-level bypass first, then configuration, and upstream code changes last.

  1. Command level: add -w yourself, i.e. dsh plugin --profile <name> add -w <spec>; the community measured exit 0.
  2. Configuration level: write an .npmrc beside pnpm-workspace.yaml with ignore-workspace-root-check=true.
  3. Upstream level: have dsh automatically add --workspace-root when forwarding add/remove; for a managed profile the profile is always the root, so the argument is always correct.
  4. Another upstream option: stop generating pnpm-workspace.yaml for single-package profiles at all.
  5. Whichever you choose, verify once by creating a clean profile and installing again, avoiding interference from old caches.

DSH Plugin: Controlled comparison: same layout, only the version changes

The community ran the cleanest single-variable comparison, and the conclusion is obvious.

pnpm versionPassed -w?Result
9.15.9NoERR_PNPM_ADDING_TO_ROOT, exit 1
9.15.9Yesexit 0, installed
11.28.5Noexit 0, installed

The minimal reproduction is just as direct: use a tarball with no dependencies (to rule out dependency resolution), use a brand-new profile name so dsh creates the directory itself, then run dsh plugin --profile wprobe add D:\probe\dsh-probe-pkg-1.0.0.tgz.

DeepSeek Harness: What the scene looks like: terminal versus log

The terminal shows only a generic failure; the full command is in the log, and comparing the two confirms it.

text
# terminal
dsh: initialized profile wprobe at C:\Users\<user>\.dsh\profiles\wprobe
ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root ... 
dsh: plugin command failed; diagnostics: ...\.plugin-manager\logs\operation-iVz9LN\pnpm.log
[exit code: 1]

# pnpm.log
Command failed with exit code 1: pnpm add "D:\probe\dsh-probe-pkg-1.0.0.tgz"

If pnpm add has no -w after it, cross-check pnpm --version and the case is basically closed.

DSH plugin: Why this error is especially hard to diagnose

The error contains no hint about the pnpm major version, leaving users unable to tell a version support problem from a plugin problem.

  1. The terminal shows only dsh: plugin command failed and a log path.
  2. The real command and error live in .plugin-manager/logs/operation-*/pnpm.log.
  3. The ERR_PNPM_ADDING_TO_ROOT in the log is pnpm's wording and says nothing about dsh.
  4. The result: when automation invokes this command, all it can surface is a generic failure.
  5. The community notes that a downstream project hit the same trap with a byte-identical symptom.

Should pnpm 9 count as supported?

The community has no verdict, but it affects you: if 9 is out of support, dsh should state the version requirement instead of throwing a pnpm internal error.

  1. Ask yourself whether other pnpm-dependent workflows already require 10+.
  2. If the team upgrades to pnpm 11 together, the problem disappears.
  3. If you must stay on pnpm 9, use the command-level or configuration-level bypass above.
  4. Either way, include pnpm --version in the failure report.
  5. If upstream adopts it, the minimal change is adding --workspace-root when forwarding, plus a pnpm 9 regression test.

Cautions

Read the log command and the pnpm major before touching the plugin.

  1. Do not suspect the plugin package first. A dependency-free tarball fails the same way.
  2. Do not read only the terminal output. The real command is in pnpm.log.
  3. Do not delete pnpm-workspace.yaml by hand. dsh maintains it and may regenerate it.
  4. Do not test on the wrong profile. Reproduce with a brand-new profile name to rule out historical interference.
  5. Record the pnpm major version. It is the only basis for separating "compatibility defect" from "unsupported environment".

If your pnpm.log command already contains -w and still fails, this is not the issue — check the network source or package signature.See Fix "pnpm failed in profile directory" for DSH plugins for the related case.

FAQ

dsh plugin add in DeepSeek Harness reports ERR_PNPM_ADDING_TO_ROOT — is the plugin package broken?

No, the plugin package is not broken: DeepSeek Harness generates pnpm-workspace.yaml (packages: - .) when initializing a profile, so pnpm treats the profile as a workspace root; the forwarded pnpm add does not include --workspace-root, and pnpm 9's workspace-root guard rejects it.

Why does the plugin install on some DeepSeek Harness machines and not others?

The outcome depends on which pnpm major version is on PATH for DeepSeek Harness. In the community comparison, pnpm 9.15.9 failed without -w and succeeded with it, while pnpm 11.28.5 succeeded without -w. This is a pnpm major-version dependency, not random environment flakiness.

What is the fastest workaround in DeepSeek Harness?

The fastest workaround in DeepSeek Harness is to add -w yourself: dsh plugin --profile <name> add -w <package-or-tgz>, which the community measured as exit 0 with a successful install.

Can I bypass it with DeepSeek Harness configuration?

Yes, you can bypass it in DeepSeek Harness with configuration: write an .npmrc beside the generated pnpm-workspace.yaml with ignore-workspace-root-check=true. Alternatively upstream can add --workspace-root when forwarding, or stop generating a workspace file for single-package profiles.

How do I confirm this is the problem I hit in DeepSeek Harness?

To confirm this is the problem you hit in DeepSeek Harness, check whether the command in .plugin-manager/logs/operation-*/pnpm.log is pnpm add <spec> without -w, then check whether pnpm --version is 9.x. Both holding together is almost certainly this issue.

Related Terms

ERR_PNPM_ADDING_TO_ROOT
ERR_PNPM_ADDING_TO_ROOT is the error pnpm returns when add runs in a workspace root without an explicit declaration, asking for -w or --workspace-root. It means the target location is ambiguous, not that the package is broken.— https://github.com/deepseek-ai/deepseek-harness/discussions/10629
pnpm-workspace.yaml
pnpm's workspace declaration is `pnpm-workspace.yaml`: when present, that directory is treated as the workspace root. dsh generates it automatically for each profile, with a packages list and settings such as nodeLinker.— https://github.com/deepseek-ai/deepseek-harness/discussions/10629
--workspace-root
--workspace-root is a pnpm add argument that explicitly installs the dependency into the workspace root. In a dsh-managed profile the profile itself is the root, so the argument always applies.— https://github.com/deepseek-ai/deepseek-harness/discussions/10629
managed profile
A managed profile is a profile directory created and maintained by dsh, containing package.json, pnpm-workspace.yaml, and a lockfile. Plugin installation targets its package.json.— https://github.com/deepseek-ai/deepseek-harness/discussions/10629

Sources