Skip to content
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 incorrectly gets wrong dependency #7969

Closed
vixalien opened this issue Apr 19, 2024 · 7 comments
Closed

pnpm incorrectly gets wrong dependency #7969

vixalien opened this issue Apr 19, 2024 · 7 comments

Comments

@vixalien
Copy link

Last pnpm version that worked

8.15.7

pnpm version

9.0.3

Code to reproduce the issue

I created a reproducer at https://github.com/vixalien/pnpm-dedupe-release-tags

But, you can also try this with a new package:

cd test
pnpm init
pnpm add @payloadcms/richtext-lexical@beta @payloadcms/ui@beta

Expected behavior

I would expect the packages to be normally installed, like in v8

Packages: +413
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 429, reused 413, downloaded 0, added 29, done
node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext: Running postinstall script, done in 100ms
node_modules/.pnpm/@swc+core@1.4.16/node_modules/@swc/core: Running postinstall script, done in 45ms

dependencies:
+ @payloadcms/richtext-lexical 3.0.0-beta.11
+ @payloadcms/ui 3.0.0-beta.11

Done in 33.1s

Actual behavior

They don't get installed correctly. pnpm incorrectly installs the alpha version of @payloadcms/translations for @payloadcms/richtext-lexical and even overrides won't tell it to install the correct version (beta)

Packages: +414
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 430, reused 414, downloaded 0, added 414, done
node_modules/.pnpm/@swc+core@1.4.16_@swc+helpers@0.5.5/node_modules/@swc/core: Running postinstall script, done in 85ms

dependencies:
+ @payloadcms/richtext-lexical 3.0.0-beta.11
+ @payloadcms/ui 3.0.0-beta.11

 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
└─┬ @payloadcms/richtext-lexical 3.0.0-beta.11
  └── ✕ unmet peer @payloadcms/translations@3.0.0-beta.11: found 3.0.0-alpha.0

hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.

Additional information

No response

Node.js version

v21.7.3

Operating System

Linux

@vixalien
Copy link
Author

Also, I would expect this issue to be tagged with regression. Strange...

@zkochan
Copy link
Member

zkochan commented Apr 19, 2024

It might be expected. We will check it later.

As a workaround, just install @payloadcms/translations@3.0.0-beta.11 as a direct dependency.

@yovanoc
Copy link

yovanoc commented Apr 19, 2024

Same issue, even if I put the real good version in the package.json

@zkochan
Copy link
Member

zkochan commented Apr 19, 2024

The above example works when I install beta.11 as a direct dependency. So, if it doesn't work in your case, please provide steps to reproduce.

@yovanoc
Copy link

yovanoc commented Apr 19, 2024

Regression for sure because I only got this problem since 9.X upgrade. And will narrow to a minimal repro soon

@yovanoc
Copy link

yovanoc commented Apr 19, 2024

Here it is: #7977

@zkochan
Copy link
Member

zkochan commented Apr 21, 2024

This one is fixed by #7981 too

@zkochan zkochan closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants