-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
[Bug]: Using material ui with storybooks results with "_interopRequireDefault2 is not a function" error. #28545
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Adding |
Hi @akrynski-1 Does it work with Storybook 8.1.11? |
Hi @valentinpalkovic, it does work with Storybook 8.1.11 |
Hi, I'm also having the same issue with storybook 8.2.1 |
This comment was marked as outdated.
This comment was marked as outdated.
Same here! |
Same error with importing a theme from
|
Minimal reproduction for our case with 8.2.2 Works fine if you comment out |
I am having the same issue, |
I'm having the same problem in development. The deployed version seems to work fine. |
Please let me know what version works for you. My current version:
|
I'm trying to understand what is happening, that causing this to break. I'm looking at this repro: https://stackblitz.com/edit/storybook-interoprequiredefault2-error?file=src%2FComponent.stories.jsx,src%2FComponent.jsx I'm setting a debugger at the location of the error, and it looks like what is supposed to be a function is an object with a When I change the I'm investigating still, but I'll need help from someone with deeper knowledge of vite. |
OK, I found the problem. The fix will take a minute, because it's Friday evening. |
even though this has been fixed, it isn't on the latest build yet right? |
@spaceexperiment it is pending its release Release: Patch 8.2.3 |
Describe the bug
I decided to try storybook with react and vite and it looks like it does not work with material ui.
Importing any component (for example Button) results with the following error:
Example code:
MuiButton.tsx
MuiButton.stories.tsx
Reproduction link
https://stackblitz.com/edit/github-rxrfuy-2iqxep?file=src%2Fstories%2FMuiButton.stories.ts
Reproduction steps
@mui/material
package, for exampleButton
inside a story.System
Additional context
It looks like
5.15.10
is the last version of mui that works with storybook correctly, but it's 5 months old now.The text was updated successfully, but these errors were encountered: