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

react mdx example fails when adding second storybook config to project #12253

Closed
patsplat opened this issue Aug 26, 2020 · 1 comment
Closed

Comments

@patsplat
Copy link
Contributor

Describe the bug
Encountered an import error when adding a second storybook config with --story-format mdx to an existing storybook react installation.

To Reproduce
Steps to reproduce the behavior:

  1. npx create-react-app my-app
  2. cd my-app
  3. npx sb init
  4. mkdir nested-config
  5. cd nested-config
  6. npx sb init -s -t react --story-format mdx
  7. cd ..
  8. yarn storybook -c nested-config/.storybook
  9. See Error: Element type is invalid

Expected behavior
Storybook to start without errors

Screenshots
image

System:

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
    Yarn: 1.21.1 - ~/.yarn/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v10.16.3/bin/npm
  Browsers:
    Chrome: 84.0.4147.135
    Safari: 13.1.2
  npmPackages:
    @storybook/addon-actions: ^6.0.18 => 6.0.18 
    @storybook/addon-essentials: ^6.0.18 => 6.0.18 
    @storybook/addon-links: ^6.0.18 => 6.0.18 
    @storybook/node-logger: ^6.0.18 => 6.0.18 
    @storybook/preset-create-react-app: ^3.1.4 => 3.1.4 
    @storybook/react: ^6.0.18 => 6.0.18

Additional context
This error was originally encountered in the context of a production monolith managed by a large team. The create-react-app example is provided to reproduce the error.

There is a bug fix for the import error in #12252

@shilman
Copy link
Member

shilman commented Aug 28, 2020

Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.20 containing PR #12252 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there's still more to do.

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

2 participants