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

Storybook 6.x crashes with Gatsby 2.27.1 #13241

Closed
sklawren opened this issue Nov 24, 2020 · 5 comments
Closed

Storybook 6.x crashes with Gatsby 2.27.1 #13241

sklawren opened this issue Nov 24, 2020 · 5 comments

Comments

@sklawren
Copy link

Describe the bug
Storybook 6.x is crashing with Gatsby 2.27.1. It works fine with Gatsby 2.26.1.

To Reproduce
I've posted this issue on the Gatsby Github because I'm not sure whether the error is Gatsby or Storybook. It might require some collaboration between the teams.

gatsbyjs/gatsby#28253

Expected behavior
Check the above ticket.

System

  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 12.18.4 - ~/.nvm/versions/node/v12.18.4/bin/node
    npm: 6.14.8 - ~/.nvm/versions/node/v12.18.4/bin/npm
  Browsers:
    Chrome: 87.0.4280.67
    Firefox: 82.0.2
    Safari: 14.0
  npmPackages:
    @storybook/addon-actions: ^6.1.4 => 6.1.4
    @storybook/addon-docs: ^6.1.4 => 6.1.4
    @storybook/addon-essentials: ^6.1.4 => 6.1.4
    @storybook/addon-links: ^6.1.4 => 6.1.4
    @storybook/addons: ^6.1.4 => 6.1.4
    @storybook/react: ^6.1.4 => 6.1.4
@ghengeveld
Copy link
Member

Could you try with the last Storybook 5.x? Would be helpful to know if this is a mutual incompatibility between Gatsby 2.27.1 and Storybook 6.x, specifically.

@sklawren
Copy link
Author

I used npx sb init so I'm not sure what would be required to install SB 5.x, but on the other thread, I uploaded a minimal reproduction project zip file, so you can easily try it out for yourself.

@sklawren
Copy link
Author

sklawren commented Nov 25, 2020

As a quick aside, Gatsby has a bunch of modifications required for Storybook to work with it.

They're outlined here: https://www.gatsbyjs.com/docs/visual-testing-with-storybook

Do you think npx sb init could detect a Gatsby project and include these required modifications automatically or would that be too much to maintain? I already went through this manually myself so I'm asking on behalf of future developers. 😎

@shilman
Copy link
Member

shilman commented Nov 25, 2020

@sklawren we maintain a preset for create react app that auto-configures storybook for CRA. next.js is working on something similar for next. we'd love to collaborate with the gatsby team on a preset for gatsby

@shilman
Copy link
Member

shilman commented Dec 10, 2020

sounds like this has been resolved. closing.

@shilman shilman closed this as completed Dec 10, 2020
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