storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
83.77k stars 9.18k forks source link

Empty storybook (*.stories.js ignored) #12396

Open sshmyg opened 3 years ago

sshmyg commented 3 years ago

Describe the bug

  1. Create own react boilerplate (without CRA etc.)
  2. Install @storybook/react and @storybook/cli
  3. Run npx -p @storybook/cli sb init
  4. Run yarn storybook
  5. Only mdx file in the list. Stories files was ignored.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/sshmyg/storybook-test
  2. yarn && yarn storybook

Expected behavior *.stories.js files in the list of the storybook

Screenshots image

System:

Environment Info:

  System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz
  Binaries:
    Node: 13.7.0 - ~/.nvm/versions/node/v13.7.0/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v13.7.0/bin/npm
  Browsers:
    Chrome: 85.0.4183.83
    Firefox: 80.0.1
    Safari: 13.1.2
  npmPackages:
    @storybook/addon-actions: ^6.0.21 => 6.0.21
    @storybook/addon-essentials: ^6.0.21 => 6.0.21
    @storybook/addon-links: ^6.0.21 => 6.0.21
    @storybook/cli: 6.0.21 => 6.0.21
    @storybook/react: ^6.0.21 => 6.0.21

Additional context Use storybook without CRA, or any others boilerplates.

shilman commented 3 years ago

Looks like Storybook doesn't like your custom babel config. If you remove babel.config.js it works fine.

sshmyg commented 3 years ago

@shilman Thnks, will look on it.

sshmyg commented 3 years ago

@shilman It's because of react-refresh/babel. Without it works as expected.

stale[bot] commented 3 years ago

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

stale[bot] commented 3 years ago

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Inhye-Cheong commented 2 years ago

Is this issue still unresolved? Please check if there is any update.