-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
@mui/x-charts cannot be used in Next.js, because CJS tries to import ESM #9556
Comments
It looks like the Because the charts package is new, maybe this is the chance to make this package ESM compatible? |
Thanks for the clear issue description. As a workaround, you can use But I agree we should find a way to make it work out of the box. |
I might have found a solution I've already tested it with the docs mui/material-ui#37609 Could you please give it a try by modifying the - "@mui/x-charts": "6.0.0-alpha.1",
+ "@mui/x-charts": "https://pkg.csb.dev/mui/mui-x/commit/0321f7bb/@mui/x-charts", |
Should be fixed by #9645 (available from v6.0.0-alpha.4) |
I've installed "@mui/x-charts": "^6.0.0-alpha.5", and I'm still getting the same error.
|
@kajann Do you have a reproduction with the latest version? |
Seems like the issue is still persistent (not ESM compatible) https://publint.dev/@mui/x-charts@6.0.0-alpha.5 |
I created a simple repository with The |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/mui-mui-x-9556-4k5m67
Steps:
Current behavior 😯
The following error is thrown by Next.js:
In the browser, this is shown:
Expected behavior 🤔
The component would be imported just fine.
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: