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

this package is not compatible with type: module #64

Open
Aghassi opened this issue Jul 19, 2023 · 1 comment
Open

this package is not compatible with type: module #64

Aghassi opened this issue Jul 19, 2023 · 1 comment

Comments

@Aghassi
Copy link

Aghassi commented Jul 19, 2023

If you have a package that sets type: module, and that package imports this package you can get into a weird error state where this package seems to return a bad object. In our case, our chain was Vite --> ESBuild --> Emotion --> This package. We suspect it is this package because components that didn't rely on this rendered just fine. Components that did rely on this hit an error boundary that had the following:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

I'm still debugging but this library seems to be the root cause/culprit.

As an aside, is this library still under active development @felippenardi? I'm concerned that this library is not compatible with the ever changing JS ecosystem going forward

@Aghassi
Copy link
Author

Aghassi commented Jul 19, 2023

Ok well here is the root cause

vitejs/vite#2139 (comment)
rollup/plugins#481
rollup/plugins#654

I'd like to request that this package change the way it ships. If you can instead just ship transpile source code instead of prebundling this issue is basically avoided.

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

1 participant