Replies: 2 comments
|
The rc.7 source confirms why the plugin package cannot repair this boundary itself. Because pnpm rejects the invocation before download or package execution, the bounded user workaround is correctly scoped to the DSH-owned operation: dsh plugin --profile web add -w <reviewed-package>I would avoid recommending a global For the durable CLI fix, adding Source-pinned runbook and failure routing: https://sandbaseai.github.io/deepseek-harness-handbook/pnpm-adding-to-root.html Disclosure: independent SandBase community handbook, not official DeepSeek documentation. |
|
Traced this to The guard exists to catch an accidental root-level add in a multi-package workspace. A profile has exactly one member (itself), so there's no other package the add could have meant — Verified fix, tested on pnpm 9.12.0 / Node 22.23.2 against a from-source // packages/boot/app-boot/src/profile.ts
const PROFILE_NPMRC = `auto-install-peers=false
ignore-workspace-root-check=true
`
export function initProfile(dir: string, bundles: readonly string[]): void {
// ...existing package.json / cordis.patch.yml / pnpm-workspace.yaml writes...
const npmrcPath = join(dir, '.npmrc')
if (!existsSync(npmrcPath)) writeFileSync(npmrcPath, PROFILE_NPMRC)
}(The Happy to send a PR with this, but saw the note in CONTRIBUTING.md that external PRs aren't being taken right now, so posting the diff here instead. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
dsh plugin --profile web add <package>fails on affected pnpm versions because DSH initializes the profile directory as a pnpm workspace root, then forwardspnpm addwithout explicitly targeting that root.This is not specific to one plugin. Any third-party plugin installation can be blocked in the same environment.
A user first reported the failure while installing
@xmanrui/dsh-im: xmanrui/dsh-im#15Reproduction environment
@deepseek-ai/dsh:0.1.0-rc.60.1.0-rc.7tarball was also inspected and has the same forwarding behaviorv24.13.09.15.9DSH_HOMESteps to reproduce
Actual result
The command exits with status 1.
Expected result
dsh plugin --profile web add <package>should install the plugin into the selected profile without requiring users or every plugin author to know that the profile is implemented as a pnpm workspace root.The DSH CLI help itself currently presents this form without
-w:Root cause
DSH profile initialization writes a
pnpm-workspace.yamllike this:The plugin command then runs pnpm in that directory and forwards the supplied arguments verbatim. On pnpm versions that enforce the workspace-root safety check, this becomes effectively:
Since the current directory is the workspace root, pnpm rejects the operation unless
-wor--workspace-rootis explicit.The
url.parse()deprecation warning sometimes printed in the same report is unrelated to the nonzero exit.Verified workaround
Only adding
-wfixes the failure:With pnpm
9.15.9, the original command exits 1. The command with-wexits 0, fully installs@xmanrui/dsh-im@0.11.0, writes it todependencies, adds it todsh.profile.bundles, and passes:Compatibility checks:
-w-wERR_PNPM_ADDING_TO_ROOTERR_PNPM_ADDING_TO_ROOTERR_PNPM_ADDING_TO_ROOTRelying on newer pnpm behavior is less robust than stating the intended root target explicitly.
Proposed fix
Because
dsh plugin --profile <name>owns and manages the selected profile directory, DSH should explicitly target the workspace root for profile dependency mutations instead of requiring every plugin README and installer to add a raw pnpm implementation flag.For example, normalize the forwarded invocation so
addand other relevant profile-root mutations include--workspace-root, then update the CLI help example and add regression coverage with pnpm 9 plus the latest supported pnpm.Suggested regression assertions:
dsh plugin --profile web add <package>command.package.json.dsh.profile.bundles.dsh --profile web --dump-configsucceeds.Impact
This blocks first-time installation for every community plugin on affected pnpm versions. The error occurs before plugin download or plugin code execution, so plugin packages cannot fix the underlying DSH command contract themselves; they can only document
-was a temporary workaround.All reactions