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

[Bug][1.0]: @rsbuild/plugin-swc has unmet peer dependencies #2766

Closed
colinaaa opened this issue Jul 3, 2024 · 7 comments
Closed

[Bug][1.0]: @rsbuild/plugin-swc has unmet peer dependencies #2766

colinaaa opened this issue Jul 3, 2024 · 7 comments
Labels
🐞 bug Something isn't working

Comments

@colinaaa
Copy link
Contributor

colinaaa commented Jul 3, 2024

Version

npmPackages:
    @rsbuild/core: 1.0.0-alpha.0 => 1.0.0-alpha.0
    @rsbuild/plugin-react: 1.0.0-alpha.0 => 1.0.0-alpha.0
    @rsbuild/plugin-swc: 1.0.0-alpha.0 => 1.0.0-alpha.0

Details

 WARN  Issues with peer dependencies found
.
└─┬ @rsbuild/plugin-swc 1.0.0-alpha.0
  └─┬ @modern-js/swc-plugins 0.6.7
    └── ✕ unmet peer @swc/helpers@0.5.3: found 0.5.11 in @rsbuild/plugin-swc

Reproduce link

https://rsbuild.dev/guide/start/quick-start

Reproduce Steps

  1. npm create rsbuild@alpha
  2. pnpm add -D @rsbuild/plugin-swc
@colinaaa colinaaa added the 🐞 bug Something isn't working label Jul 3, 2024
@xc2
Copy link
Collaborator

xc2 commented Jul 11, 2024

@JSerFeng is the peer dependency @swc/helpers still needed for @modern-js/swc-plugins?

I don't think @modern-js/swc-plugins directly depends on @swc/helpers, and it doesn't seem to be restricted to work with a specific version of @swc/helpers. Could we just remove the peer dependency?

@JSerFeng
Copy link
Contributor

JSerFeng commented Jul 12, 2024

@modern-js/swc-plugins has dependency of @swc/core, the output generated by @swc/core needs specific version of @swc/helpers.

If one user uses @modern-js/swc-plugins which depends on @swc/core@0.5(just for example), and @swc/core depends on @swc/helpers@0.1.0, if you use @swc/helpers@0.2.0, it will crash

@chenjiahan
Copy link
Member

@rspack/core uses "@swc/helpers": ">=0.5.1" instead of pin to 0.5.1.

How about making the same change for @modern-js/swc-plugins?

@chenjiahan
Copy link
Member

@JSerFeng bump

@JSerFeng
Copy link
Contributor

JSerFeng commented Jul 17, 2024

How about making the same change for @modern-js/swc-plugins?

That's fine I think.

Should we make @swc/helpers as an optional peer ?

@chenjiahan
Copy link
Member

Should we make @swc/helpers as an optional peer ?

LGTM 😄

@chenjiahan
Copy link
Member

Fixed: https://github.com/web-infra-dev/rsbuild/releases/tag/v1.0.1-beta.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants