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

Invalid option "jsx" due to old esbuild version. #303

Closed
Diabl0269 opened this issue Aug 1, 2021 · 2 comments
Closed

Invalid option "jsx" due to old esbuild version. #303

Diabl0269 opened this issue Aug 1, 2021 · 2 comments

Comments

@Diabl0269
Copy link

Diabl0269 commented Aug 1, 2021

We are working in a monorepo and using rollup with this plugin for building our modules, however we started getting this error:
Error: Transform failed with 1 error: error: Invalid option in transform() call: "jsx"

I debugged both the plugin and esbuild and found out that the issue was caused due to the plugin adding a "jsx" option which isn't supported in the esbuild version noted in the plugin's pacakge.json.
I was able to solve it by manually installing the latest version of esbuild, but I think that its best to also update the version the the plugin's pacakge.json.

rollup-plugin-esbuild version: 4.5.0
esbuild in the plugin's package.json: 0.12.5
My esbuild version: 0.12.7

@sauravhiremath
Copy link

Had the same issue, had to manually update the transient dependency [esbuild] to v0.12.27 to make it work.

Also patch-package doesn't work here, as it doesn't support patching the package.json file (Reason explained here)

Still waiting for a workaround :/

@egoist
Copy link
Owner

egoist commented Sep 13, 2021

esbuild is a peer dependency, you can just install the version you want.

@egoist egoist closed this as completed Sep 13, 2021
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