Error when upgrading pnpm to latest in `devEngines.packageManager`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- nodejs, typescript
Research direction
Start by reproducing the reported failure with a package.json containing devEngines.packageManager, then run corepack use pnpm@11.13.0 or corepack use pnpm@latest. Trace the command's handling of devEngines.packageManager and packageManager; done means the requested version updates without a conflicting packageManager specification.
Written by the indexing model from the issue text.
Description
If pnpm is previously set at a specific version such as 11.12.0 in devEngines.packageManager:
package.json
{
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "11.12.0+sha512.820a6fbd0d9f04c226638002aead1e45340a9139dd5dc077c1d83ef44aa2481c8eb6637b4c9aa696a3c7e35ba818e49cf27213e5f2b91138d09b7a3e26e898ba"
}
}
}
Then upgrading using corepack use pnpm@11.13.0 (or corepack use pnpm@latest) fails with a confusing error:
$ corepack use pnpm@11.13.0
Installing pnpm@11.13.0 in the project...
Usage Error: The requested version of pnpm@11.13.0+sha512.88d94724d8f2e6c186744a5584c6e59ecac869ec7ba15e9cb4cd628e8dc7066820b2481d8ee3b51ea8da323a7378068aa58c556a3720d32b7c20a051d088363a does not match the devEngines specification (pnpm@11.12.0+sha512.820a6fbd0d9f04c226638002aead1e45340a9139dd5dc077c1d83ef44aa2481c8eb6637b4c9aa696a3c7e35ba818e49cf27213e5f2b91138d09b7a3e26e898ba)
$ corepack use <pattern>
It appears to be caused by Corepack attempting to add a packageManager field for 11.13.0 which conflicts with devEngines.packageManager's version of 11.12.0.
Some projects only want to rely on devEngines.packageManager, instead of also using packageManager or duplicating the fields.
Could Corepack instead update the version in devEngines.packageManager and not attempt to add packageManager?
Related issues
It appeared at first that this was related to issue #729, but I think my issue here is narrower - about a specific failure case.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/corepack
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·