-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Uncaught TypeError: Object(...) is not a function - @emotion #4796
Comments
https://github.com/storybooks/storybook/blob/next/MIGRATION.md#react-163 Please upgrade to React 16.3+ and this problem should go away. We hope to re-introduce support for older versions of React in Storybook 4.1 coming soon. |
Working again, thanks 👍 |
I'm seeing this issue. Using react 16.6.3, cheers |
i am using preact instead of react, what changes are required in preact to make this work (basically what is the specific change from old react to 16.3+), also should i open a new bug? |
Also seeing this issue when trying to use emotion for my own components. Using: |
I'm seeing this issue. Using react 16.7.0-alpha.2, cheers UPD: |
I'm seeing this issue too: react 16.6.3 |
There was an issue where it caused storybook compilation issues. For more info: storybookjs/storybook#4796
I'm also seeing this issue react 16.6.3 |
I had the same problem.
After all, I downgraded emotion to 0.x.x and it's working fine now.
I should have taken the warning message 😅
|
Linking the #4925 pr for reference. |
I have:
And it's not working either. 😢 |
Any clue on how to overcome this? I'd gladly try to fix it, but I'm not certain if I would be able to do it. |
@diegopamio I tried but I could not 😢 |
@diegopamio Only fix I could find was to downgrade (as @ysgk mentioned) to:
|
I think what should be done is upgrading Storybook's Emotion to last version, but I'm not sure how could that affect to people using prior versions of Emotion, or whether that is relevant for Storybook's authors. After all, retrocompatibility can be like being flatmates with an ex. For the ones who are looking for a nice alternative: |
I just installed It's working for me.
node: |
This should not be closed; I'm using React 16.7 and getting the same error. |
I fixed this for myself by downgrading to Storybook 3. |
That's not a "fix", it's a workaround at most. The issue needs to be addressed. |
This issue is being addressed as mentioned in the previous comments. |
Just realized v5 alpha is out and it works for me. Should this issue be closed. |
Sorry, forgot to comment on this issue. v5 is in alpha on the Upgrade today to try it out. We're hoping to progress to RC by next week! |
Can confirm upgrading to storyboard 5.0.0-RC1 fixed it |
Also, ran into an issue throwing Thanks! ❤️ |
@Rolandisimo better than using |
Upgraded to @ahmadalfy Fails with any 4.x.x storybook/addon I've tried. |
@viczhuravlev did you manage to fix it? |
I was able to use Storybook 4 and Emotion 10 ONLY when I installed with
|
To fix this remove all the '@emotion' packages from package.json, remove node_modules and yarn.lock (or package json lock) and yarn install. |
@ysgk Thanks, it's works with |
Has anyone found out what caused the problem in the first place? I am running on the latest versions and still encounter this error |
@angelozehr the original problem was caused by a dependency on react 16.3+ that was introduced in storybook 4.0 due to emotion. Users trying to run older react projects in 4.0 ran into this error. However, in SB4.1 we split the "manager" (UI) and "preview" (user components) into two separate processes so that it was possible to use SB4.1 with older versions of React. Now in 5.0 it appears that the same error message has come back, possibly for a different underlying problem. To make things more difficult/confusing yarn appears to have some weird interactions with Storybook, so in some cases clearing your |
@angelozehr It is a regression. See #6474 |
Still happening on 5.2.1. A bit frustrating. |
@lppedd Are you saying React15 support is broken in 5.2.1? |
@shilman apparently yes. |
confirmed 😭 |
@ndelangen this is broken in |
Closing this as a dupe to #8284 |
having the same issue when using Storybook along with Angular 11 project |
Describe the bug
When updating
@storybook/react
to4.0.7
, we are receiving the following error:To Reproduce
Steps to reproduce the behavior:
@storybook/react
version inpackages/react/package.json
to4.0.7
npm install
on the root folder of the reponpm run storybook
inpackages/react
The text was updated successfully, but these errors were encountered: