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

Optional peer dependency cause unmet warning #7985

Closed
2 of 4 tasks
kingyue737 opened this issue Apr 22, 2024 · 3 comments · Fixed by #8028
Closed
2 of 4 tasks

Optional peer dependency cause unmet warning #7985

kingyue737 opened this issue Apr 22, 2024 · 3 comments · Fixed by #8028
Assignees

Comments

@kingyue737
Copy link

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

Dependencies resolver

Link to the code that reproduces this issue or a replay of the bug

https://stackblitz.com/edit/vitejs-vite-sttob6

Reproduction steps

Enter the repro link and run pnpm v9 (which is a script to install dependencies with v9 instead of default v8 in stackblitz).

Describe the Bug

The following error will be printed

    └─┬ vite-plugin-checker 0.6.4
      └── ✕ unmet peer meow@^9.0.0: found 13.2.0

Expected Behavior

Should not have unmet warning as meow is an optional dependency of vite-plugin-checker

No warning in pnpm v8

Which Node.js version are you using?

v20.11.1

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

@zkochan
Copy link
Member

zkochan commented Apr 22, 2024

meow 13 is in the dependencies of browserslist-to-esbuild@2.1.1 and is used to resolve the optional peer of vite-plugin-checker.

@kingyue737
Copy link
Author

Pnpm v8 didn't give this warning. Thus is it an issue of v8 instead of v9? How to let vite-plugin-checker ignore meow which is not required?

@zkochan
Copy link
Member

zkochan commented Apr 22, 2024

I'll think about it. Maybe we should change how it works in v9. Maybe we should hoist optional peer dependencies only if they match the range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants