Repository navigation
Replies: 1 comment
|
I think this is the same underlying issue reported in [Discussion #4680](#4680): the generated profile contains a Your reproduction provides useful additional confirmation. With pnpm 9.15.9, a bare If pnpm 9 is intended to be supported, I'd fix this in DSH's managed-profile installation path by explicitly passing Alternatively, if pnpm 9 is outside the supported range, documenting the minimum supported version and reporting it clearly would prevent users from having to diagnose this through the pnpm log. I'd add a regression test using pnpm 9.15.9 and a local tarball, verifying that a newly initialized profile receives the dependency successfully. I'd test removal separately before assuming it needs the same change. One question remains: is pnpm 9 officially within DSH's supported version range? That determines whether this is a compatibility bug or an unsupported-environment issue. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment
dshpnpmin PATHSummary
dsh plugin --profile <name> add <spec>fails withERR_PNPM_ADDING_TO_ROOTon a freshly initialized profile.dshinitializes every profile with its ownpnpm-workspace.yaml(packages: - .), but theplugincommand forwardspnpm addwithout--workspace-root. On pnpm 9 that is rejected by pnpm's workspace-root guard.Minimal reproduction
pnpm --versionreports 9.x.dshcreates it):Actual
.plugin-manager/logs/operation-*/pnpm.logcontains:The profile that
dshhad just created contains:So
dshcreates a workspace root and then immediately runs a command that pnpm refuses to run in a workspace root.Expected
dsh plugin addshould install into the profile it just created.Control experiments (same layout)
-wpassed to pnpm?Notes:
-wthrough theplugincommand makes the identical command succeed:dsh plugin --profile wprobe add -w <tgz>→ exit 0.Why this matters
Tools that automate companion/plugin installation by driving
dsh plugin --profile ... addbreak on machines where pnpm 9 is the one on PATH.One concrete downstream case: OpenDesign's agent-companion setup invokes exactly this command and can only surface a generic failure to the user (nexu-io/open-design#8919). That report was traced to the same
pnpm addcall, and theERR_PNPM_ADDING_TO_ROOTsymptom there matches this reproduction byte-for-byte.It is also worth noting the failure gives no hint about the pnpm major, so a user cannot tell whether they hit a version-support problem or a plugin problem.
Possible fixes (any one would close this)
dsh pluginappend--workspace-rootwhen forwardingadd/removefor a managed profile — the profile is the workspace root by construction, so this is always correct for that command.ignore-workspace-root-check=trueinto an.npmrcnext to the generatedpnpm-workspace.yaml.pnpm-workspace.yamlfor single-package profiles.Question
Is pnpm 9 outside the supported range for
dsh plugin?If it is supported, the forwarding looks like a bug. If it is not supported, documenting a minimum pnpm major (and warning when a lower one is detected) would already save a lot of debugging time — right now the only signal is an opaque pnpm error inside a log file.
Thanks!
All reactions