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

Docs Broken for Stories Using Chakra UI/Emotion #16252

Closed
neilchaudhuri opened this issue Oct 6, 2021 · 6 comments
Closed

Docs Broken for Stories Using Chakra UI/Emotion #16252

neilchaudhuri opened this issue Oct 6, 2021 · 6 comments

Comments

@neilchaudhuri
Copy link

Describe the bug

I am building components using Chakra UI, which uses Emotion. When I navigate to the docs tab, it's blank and breaks all stories after you go there.

Here is the stack trace

Screen Shot 2021-10-05 at 8 07 49 PM

To Reproduce

Project here

System

Environment Info:

  System:
    OS: macOS 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 14.17.3 - /usr/local/bin/node
    npm: 6.14.13 - /usr/local/bin/npm
  Browsers:
    Chrome: 94.0.4606.71
    Safari: 15.0
  npmPackages:
    @storybook/addon-a11y: ^6.3.9 => 6.3.9 
    @storybook/addon-essentials: ^6.3.9 => 6.3.9 
    @storybook/addon-links: ^6.3.9 => 6.3.9 
    @storybook/react: ^6.3.9 => 6.3.9 
    @storybook/testing-react: 0.0.22 => 0.0.22 

Additional context

Please note I myself do not have any need for MDX (of course Storybook may need it internally).

@neilchaudhuri
Copy link
Author

As I look into the issue more, I experimented with removing the Vite-related configuration from main.js.

The result is that the component doesn't render properly because Chakra UI, for reasons I can't discern, doesn't resolve the background color (called clickable in the theme file) properly. However, the Docs page does appear this time.

@neilchaudhuri
Copy link
Author

I tried updating with@storybook/theming, but it didn't work. Reproduction repo updated to reflect changes that still cause the addon-docs to fail

@shilman
Copy link
Member

shilman commented Nov 19, 2021

@neilchaudhuri
Copy link
Author

Thanks for making me aware of this. I just tried, and it didn't help.

Now to be fair, I am using storybook-builder-vite, so I might need to do something in addition. I will keep tinkering.

@shilman
Copy link
Member

shilman commented Nov 19, 2021

@neilchaudhuri Indeed that possible (?!) workaround is only for webpack 🤦

@ndelangen
Copy link
Member

I suspect this problem is solved in storybook 7.0 beta.

Please let me know if it doesn't and re-open this issue. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants