You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With subspaces enabled and pnpm 11, rush install / rush update fails on any subspace that carries a cross-subspace workspace:* dependency:
ERR_PNPM_WORKSPACE_PKG_NOT_FOUND In ../../../apps/api: "@my/tooling-package@workspace:*" is in the dependencies but no package named "@my/tooling-package" is present in the workspace
This is the other half of #5837 / #5838: those relocated the settings (globalOverrides, minimumReleaseAge, patches…) from package.json / .npmrc to the generated pnpm-workspace.yaml for pnpm 11 — but the subspace global pnpmfile (the shim that rewrites cross-subspace workspace:* specifiers to link: specifiers) is still wired up via the generated .npmrc:
pnpm 11 only reads auth/registry settings from .npmrc (pnpm settings), so this line is silently ignored, the shim never loads, and the workspace:* rewrite never happens.
A project in subspace A depending on a project that lives in the default subspace via "workspace:*"
rush.json: "pnpmVersion": "11.17.0" → rush update → ERR_PNPM_WORKSPACE_PKG_NOT_FOUND on the first subspace install
Same repo with "pnpmVersion": "10.34.5" → installs fine (the .npmrc line is honored)
Verified fix direction
The generated global-pnpmfile.cjs itself works fine under pnpm 11 — only the wiring is dead. Both of these make the same failing install succeed (tested against pnpm 11.17.0):
appending globalPnpmfile: <subspace temp folder>/global-pnpmfile.cjs to the generated pnpm-workspace.yaml (pnpm 11 still supports the globalPnpmfile setting — and unlike pnpmfile, setting it does not disable the default .pnpmfile.cjs loading, so the per-subspace user pnpmfile shim keeps working);
passing --config.pnpmfile=global-pnpmfile.cjs on the pnpm command line.
The first mirrors exactly what #5838 did for the other settings: for pnpm 11+, emit globalPnpmfile through PnpmWorkspaceFile (keeping the .npmrc line for pnpm ≤ 10, unchanged behavior).
I have a PR ready for this — opening it right after this issue.
Summary
With subspaces enabled and pnpm 11,
rush install/rush updatefails on any subspace that carries a cross-subspaceworkspace:*dependency:This is the other half of #5837 / #5838: those relocated the settings (
globalOverrides,minimumReleaseAge, patches…) frompackage.json/.npmrcto the generatedpnpm-workspace.yamlfor pnpm 11 — but the subspace global pnpmfile (the shim that rewrites cross-subspaceworkspace:*specifiers tolink:specifiers) is still wired up via the generated.npmrc:https://github.com/microsoft/rushstack/blob/main/libraries/rush-lib/src/logic/base/BaseInstallManager.ts#L540-L542
pnpm 11 only reads auth/registry settings from
.npmrc(pnpm settings), so this line is silently ignored, the shim never loads, and theworkspace:*rewrite never happens.Repro
subspacesEnabled: truedefaultsubspace via"workspace:*"rush.json:"pnpmVersion": "11.17.0"→rush update→ERR_PNPM_WORKSPACE_PKG_NOT_FOUNDon the first subspace install"pnpmVersion": "10.34.5"→ installs fine (the.npmrcline is honored)Verified fix direction
The generated
global-pnpmfile.cjsitself works fine under pnpm 11 — only the wiring is dead. Both of these make the same failing install succeed (tested against pnpm 11.17.0):globalPnpmfile: <subspace temp folder>/global-pnpmfile.cjsto the generatedpnpm-workspace.yaml(pnpm 11 still supports theglobalPnpmfilesetting — and unlikepnpmfile, setting it does not disable the default.pnpmfile.cjsloading, so the per-subspace user pnpmfile shim keeps working);--config.pnpmfile=global-pnpmfile.cjson the pnpm command line.The first mirrors exactly what #5838 did for the other settings: for pnpm 11+, emit
globalPnpmfilethroughPnpmWorkspaceFile(keeping the.npmrcline for pnpm ≤ 10, unchanged behavior).I have a PR ready for this — opening it right after this issue.