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

Using Emotion seems to break MDX #15390

Closed
rsmidt opened this issue Jun 27, 2021 · 1 comment
Closed

Using Emotion seems to break MDX #15390

rsmidt opened this issue Jun 27, 2021 · 1 comment

Comments

@rsmidt
Copy link

rsmidt commented Jun 27, 2021

Describe the bug
Using Emotion seems to break stories in MDX format. The following stack trace is from the auto generated Introduction.stories.mdx:

Uncaught (in promise) TypeError: theme.background is undefined
    DocsWrapper DocsPage.js:45
    handleInterpolation emotion-serialize.browser.esm.js:137
    serializeStyles2 emotion-serialize.browser.esm.js:251
    Styled emotion-styled-base.browser.esm.js:110
    withEmotionCache2 emotion-element-a8309070.browser.esm.js:27
    React 12
    unstable_runWithPriority scheduler.development.js:468
    React 7
    renderDocs StoryRenderer.js:462
    _callee2$ StoryRenderer.js:258
    Babel 8
    _callee$ StoryRenderer.js:160
    Babel 8
    forceReRender StoryRenderer.js:103
    node_modules chunk-7D4YIRY2.js:1336
    node_modules chunk-FLULKQ2P.js:632
    handleEvent index.js:167
    handler2 index.js:93
    emit index.js:100
    updateGlobals story_store.js:826
    node_modules chunk-FLULKQ2P.js:2899
    node_modules chunk-FLULKQ2P.js:632
    handleEvent index.js:167
    node_modules chunk-FLULKQ2P.js:526
    node_modules chunk-7D4YIRY2.js:276
    handleEvent index.js:258
DocsPage.js:45:5

To Reproduce
The repo including the storybook can be found here: https://github.com/vocabularee/web/tree/voc-38-add-storybook-for-building-ui-components.

System

Environment Info:

  System:
    OS: Linux 5.12 Manjaro Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.17.1/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.1/bin/npm
  Browsers:
    Firefox: 89.0.2
  npmPackages:
    @storybook/addon-actions: ^6.4.0-alpha.3 => 6.4.0-alpha.3
    @storybook/addon-essentials: ^6.4.0-alpha.3 => 6.4.0-alpha.3
    @storybook/addon-links: ^6.4.0-alpha.3 => 6.4.0-alpha.3
    @storybook/react: ^6.4.0-alpha.3 => 6.4.0-alpha.3

Additional context
I'm using the experimental? storybook-builder-vite.

@ndelangen
Copy link
Member

This is fixed in storybook 7.0 beta.

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