Repository navigation
Replies: 1 comment
|
The workspace is fine; the pnpm that runs is the variable. A profile really is its own workspace: Where I disagree: pnpm 12 did not reject that shape in my runs. Same directory, same files,
So the safeguard is on 9/10, not on 11/12 as far as I can measure. That points at the binary dsh resolves, not the version printed in a different shell: the CLI uses Immediate workaround: On the two fixes: adding |
Uh oh!
There was an error while loading. Please reload this page.
"##
dsh plugin addfails on pnpm 12 withERR_PNPM_ADDING_TO_ROOT\n\n### What happened\n\nInstalling a plugin into a profile fails before pnpm even starts resolving the package:\n\nsh\ndsh plugin --profile demo add <package>\n\n\n\n ERR_PNPM_ADDING_TO_ROOT Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.\nCommand failed with exit code 1: pnpm add '<package>'\ndsh: plugin command failed; diagnostics: <profile>/.plugin-manager/logs/operation-XXXX/pnpm.log\n\n\n### Why\n\nA profile is its own pnpm workspace \u2014<profile>/pnpm-workspace.yamlcontainspackages: [.]\u2014 so the profile directory is the workspace root. The plugin manager runspnpm add <spec>inside it without--workspace-root, and pnpm 12 rejects that combination as an error (in pnpm 10 and 11 the same call only warned).\n\nSodsh plugin addis unusable on a machine with pnpm 12, for every package, tarball included.\n\n### Repro\n\nAny profile, any spec, with pnpm 12 onPATH:\n\nsh\ndsh plugin --profile demo add <package>\n\n\n### Workaround\n\nRun the add by hand in the profile directory with-w, then add the package todsh.profile.bundles:\n\nsh\ncd <profile>\npnpm add <package> -w\n\n\n### Suggestion\n\nEither pass--workspace-rootin the plugin manager's pnpm invocation, or setignore-workspace-root-check: truein the profile'spnpm-workspace.yamlit generates \u2014 the second keeps the manager's pnpm call unchanged and matches the setting pnpm's own error message points at.\n"All reactions