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
Storybook 5 breaks with Emotion 9 #6337
Comments
@elliotdickison What addons are you using? |
No addons, @storybook/react@5.0.5 is my only storybook dependency. |
Storybook runs two separate webpacks: one for the "preview" (user code, running in an iframe) and a second for the "manager" (UI wrapping that iframe). AFAIK the preview has no dependency on emotion unless you happen to be using a buggy addon (which you're not). So this makes me think that simply running emotion 9/10 together in the same browser window, even if they are in different iframes, is causing an issue. I could be wrong since I'm not an emotion expert (and since there are lots of moving parts). But if that's the case, what would you suggest we could do differently, short of not using emotion to theme our UI? |
That is good to know. It sounds like this is more likely an emotion issue. I'll close for now, thank you for the help! |
having this issue @elliotdickison , did you file an issue to emotion? |
I did not, I was never really able to get to the bottom of it. Our plan is to just upgrade to emotion 10 when we upgrade storybook since we’re using the framework-agnostic API that didn’t change between 9 and 10. |
Describe the bug
I'm working on react@16.3.x components that use emotion@9.2.x. I recently upgraded to @storybook/react@5.0.x, but when I boot it up I get the following runtime error:
I dug into it and it appears that this is due to the fact that storybook is pulling in @storybook/theming, which is in turn pulling in emotion 10, which does not play nice with emotion 9.
To Reproduce
Install Storybook 5 in a project that uses Emotion 9.
Expected behavior
I would expect to be able to drop components into Storybook without having to use the same css-in-js library/version as Storybook.
Additional context
Thanks for the great work on storybook!
The text was updated successfully, but these errors were encountered: