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
pnpm install --frozen-lockfile
fails with pnpm v9
#7934
Comments
Can confirm and also looking to hear from the team if the lockfile not being backwards compatible was intended:
|
I am seeing the exact same issue with pnpm v9 and a lock file with version 6. I thought only v5 was dropped? |
A temporary solution for me was to get my workflows to install a specific pnpm version rather than the latest version |
I can check. But you should be able to run |
pnpm 9 seems to be incompatible with lockfile v6.0:
Is no lockfile version compatible with both pnpm 8 and 9? The changelog seemed to suggest that Lockfile v6 is supported in pnpm 9, but I can't get it to work. Edit: Readonly support for Lockfile v6 as introduced in pnpm 9.0.1 is a good compromise |
Lockfile v6 will work with pnpm v9 but only as readonly (after this fix: #7935). v9 will not make updates in the previous format. As I said before. This is a breaking change for a reason. We had to change the lockfile format in order to fix some issues with peer dependencies. The fix was too big to port it to v8. |
While I can also confirm incompatibility of lock-file versions between 8.15.5 & 9.0.0, there's the other thing related to If no
gives you 9.0.0. with the notorious:
That doesn't happen locally, but for some reason happens on a CI. The solution is to check in the @zkochan , isn't it a bit strange that any tag on corepack started pointing to 9.0.x? EDIT: any tag -> any 8.15.x tag. I tried 1 to 5, and got 9.0.0 each time on CI |
By default Not sure what the issue with corepack is |
@zkochan My guess would be that it's some issue with some part of node's ecosystem. |
I tested it in a node.js docker container (
Which should update the field in |
The |
pnpm install --frozen-lockfile
fails with pnpm v9
Yep, I also mentioned that section of pnpm docks with Nevertheless, I beg my pardon. Doublechecked the pipe logs. The below is not enough:
It proceeds with enabling "pnpm@latest" instead of "pnpm@8.15.5" that's is expected according to a node v.18 docs. It's solely corepack documentation issue, and has nothing to do with |
🚢 9.0.1 |
Doesn't seem related to this issue. Which version of electron is it? |
I don't understand what electron we're talking about if I don't have it in my dependencies and it's not an electron.js application |
I read the doc again. Thank you for pointing me out! |
Hi @zkochan It's still not working. In DimensionDev/Maskbook@ In the lockfile I can see my override is acknowledged: |
Also if anyone stumble here in the same case as me - it seems like |
A question: why is lockfile version 9.0 and not 7.0? |
Could it be that they wanted to make it more streamlined with the pnpm version itself? 😄 |
The lockfile version will be the same as the pnpm version where it was introduced. |
I you want to override the version of react, use an override |
Yes! I'm using it but still have the problem. Just tried again with 9.0.2 |
Hey How did you solve this? Ans still I am getting the following error: |
@milanpajovic , you have to add |
@milanpajovic corepack enable
corepack prepare pnpm@8.10.4 --activate
corepack use pnpm@8.10.4
# ... rest commands that works for us in node 18 LTS PS: in my case, I ran that locally, pushed changed corepack enable
corepack prepare pnpm@x.y.z --activate was enough. |
@milanpajovic, btw, according to the node 20.x docs you might not even need to run |
Thank you. this is how package.json looks like "engines": { |
I have the same problem: If you want to bypass this version check, you can set the "package-manager-strict" configuration to "false" or set the "COREPACK_ENABLE_STRICT" environment variable to "0" ` |
Having the same problem. |
Having same issue : local pnpm version is 9.1.0 and CI version is 8.14.1 I am interested in backward compatibility Say local pnpm install is made with 8.14.1 Will pnpm 9+ succeed with pnpm install --frozen-lockfile on the CI ? |
Having the same issue in CI with Vercel. Vercel provide ATM pnpm@9.0.4. But we use 9.1.1.
This will write whatever current installed version is on your system to the |
@exiguus Can you give me a hint how to do this? Is this something like a pre-build hook that I can set up on Vercel side? |
You can enable core pack at Vercel by using environment variable - https://vercel.com/changelog/corepack-experimental-is-now-available |
Sure, i described the solution more in detail in this comment: #8087 (comment) Basically you have to add your own install command in Vercel and run
|
Verify latest release
pnpm version
9.0.0
Which area(s) of pnpm are affected? (leave empty if unsure)
Lockfile
Link to the code that reproduces this issue or a replay of the bug
https://github.com/DimensionDev/Maskbook/pull/11571/files
Reproduction steps
Clone the PR and try an upgrade
Describe the Bug
I upgraded pnpm from 8.7.6 to 9.0.0 and the lockfile is broken (as you can see in the link I mentioned).
One thing you can observe is that: peer dependencies to react are mostly resolved to 18.2.0, not
0.0.0-experimental-8039e6d0b-20231026
as I specified inpackage.json/pnpm/peerDependencyRules/allowedVersions
.I tried to remove the whole section of
allowedVersions
and reinstall, then add it back hope it can re-resolve dependencies, but that does not work.Expected Behavior
Upgrade and keep my peer dependencies version correct
Which Node.js version are you using?
21
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: