-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please don't make error of fetching latest version information if packageManager field is specified. #625
Comments
Global impact. |
This issue is not mainly about unable to use newer version of pnpm (and other package managers), about inaccessibility with fresh corepack installation for projects has And this issue is to prevent future similar problems, not current problem. For reference, here is workarounds for current problem depending on your use case. If you can, upgrading corepack to latest can solve this problem. If this is not suitable for you, you can do:
|
Do you have some steps to reproduce for this issue? |
The error I have shown above in description section is same as #612 #613. This issue is mainly about future similar issues so no real-world reproduction steps are there with latest corepack 0.31. We can simulate the problem by |
Thank you! Now I understand. This is quite likely to happen in CI where the cache isn't preserved between runs. These steps will reproduce the issue: npm install corepack@0.30.0 -g
cd $(mktemp -d)
corepack use pnpm@9.15.0
rm -rf ~/.cache/node/corepack
corepack enable
pnpm install
It does not happen with Yarn yet because there is not yet a release which is signed with a new key. |
Summary
Please don't make error hard error of resolving latest version when
packageManager
field is specified.It might be good to not resolve latest version when
packageManager
field is specified.Description
Many projects recently experience error
Error: Cannot find matching keyid:
when we callpnpm
thoughcorepack
.The thing triggered this error is the recent update of the npmjs.org integrity key.
corepack
hard-coded the integrity key of npmjs.org, and it was updated recently, but corepack in many PCs and CIs are not updated yet since they are generally bundled in nodejs.However, this error came from fetching the latest version of package manager, which is not necessary for projects who specify
packageManager
field.Therefore, I think errors came from fetching the latest version of package manager should not be hard error.
I think not making a hard error will prevent future breakage.
Related: #613 #612 #616
The text was updated successfully, but these errors were encountered: