-
Notifications
You must be signed in to change notification settings - Fork 654
Open
Description
Summary
I’m trying to update from Rush 5.155.1 to 5.162.0 and pnpm 8.15.9 to 10 (via 9 to update the lockfile format).
After updating to Rush 5.162.0 and pnpm 9.15.9 and after updating the lockfile format to 9.0, rush install fails during the default subspace update with the following error:
The shrinkwrap file has not been updated to support workspaces. Run "rush update --full" to update the shrinkwrap file.
However, while rush update --full will complete successfully, subsequent rush update and rush install commands will continue to fail.
Even though the installation fails, rush post-install hooks are still executed.
Repro steps
rush init- Delete
common/config/rush/.pnpmfile.cjs - Create
common/config/subspaces/defaultandcommon/config/subspaces/myspacedirectories - Update configs and create a
package.json:
// common/config/rush/subspaces.json
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/subspaces.schema.json",
"subspacesEnabled": true,
"splitWorkspaceCompatibility": false,
"preventSelectingAllSubspaces": false,
"subspaceNames": [
"myspace",
"default"
]
}// mypackage/package.json
{
"name": "mypackage",
"version": "1.0.0",
"devDependencies": {
"typescript": "*"
}
}rush update
# myspace lockfile
lockfileVersion: '6.0'
settings:
autoInstallPeers: false
excludeLinksFromLockfile: false
importers:
.: {}
../../../mypackage:
devDependencies:
typescript:
specifier: '*'
version: 5.9.3
packages:
/[email protected]:
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
engines: {node: '>=14.17'}
hasBin: true
dev: true# default lockfile
lockfileVersion: '6.0'
settings:
autoInstallPeers: false
excludeLinksFromLockfile: false
importers:
.: {}- Update
rush.json:
"rushVersion": "5.162.0",
"pnpmVersion": "9.15.9",rush update(install-run-* scripts get updated)rush install --purge(no failure)rush update --recheckto update the lockfile format:
# myspace lockfile
lockfileVersion: '9.0'
settings:
autoInstallPeers: false
excludeLinksFromLockfile: false
pnpmfileChecksum: fm2bgttvmfglngapbjspr7zf2u
importers:
.: {}
../../../mypackage:
devDependencies:
typescript:
specifier: '*'
version: 5.9.3
packages:
[email protected]:
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
engines: {node: '>=14.17'}
hasBin: true
snapshots:
[email protected]: {}# default lockfile
lockfileVersion: '9.0'
settings:
autoInstallPeers: false
excludeLinksFromLockfile: false
pnpmfileChecksum: fm2bgttvmfglngapbjspr7zf2u
importers:
.: {}rush update
Found configuration in /workspaces/rush-bug-repro/rush.json
Rush Multi-Project Build Tool 5.162.0 - https://rushjs.io
Node.js version is 22.17.0 (LTS)
Starting "rush update"
Installing for subspace: default
Trying to acquire lock for pnpm-9.15.9
Acquired lock for pnpm-9.15.9
Found pnpm version 9.15.9 in /home/node/.rush/node-v22.17.0/pnpm-9.15.9
Symlinking "/workspaces/rush-bug-repro/common/temp/pnpm-local"
--> "/home/node/.rush/node-v22.17.0/pnpm-9.15.9"
Transforming /workspaces/rush-bug-repro/common/config/subspaces/default/.npmrc
--> "/workspaces/rush-bug-repro/common/temp/default/.npmrc"
Updating workspace files in /workspaces/rush-bug-repro/common/temp/default
The shrinkwrap file has not been updated to support workspaces. Run "rush update --full" to update the shrinkwrap file.
rush update --full(finishes successfully)rush update
Updating workspace files in /workspaces/rush-bug-repro/common/temp/default
The shrinkwrap file has not been updated to support workspaces. Run "rush update --full" to update the shrinkwrap file.
Details
The problem seems to be with this check:
rushstack/libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts
Lines 347 to 351 in 23f78ab
| // Lockfile v9 always has "." in importers filed. | |
| this.isWorkspaceCompatible = | |
| this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9 | |
| ? this.importers.size > 1 | |
| : this.importers.size > 0; |
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
5.162.0 |
rushVersion from rush.json? |
5.155.1, 5.162.0 |
useWorkspaces from rush.json? |
unset |
| Operating system? | Mac |
| Would you consider contributing a PR? | Maybe |
Node.js version (node -v)? |
22.17.0 |
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Needs Investigation