Running npx sb init
on a simple react project results in a broken Storybook
#13934
Unanswered
Bikeman868
asked this question in
Help
Replies: 3 comments 1 reply
-
This project has a variety of issues:
If I add those peer dependencies as dev dependencies and remove the babel config, Storybook loads the CLI-generated stories. There are still problems with the stories in the repo, but I didn't have time to debug them. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for your response.
This is an npm package, and setting dev dependencies is not appropriate. Is there a workaround for that?
I couldn’t find any docs on what Babel configs are compatible or incompatible with Storybook. Presumably I can have a different Babel config just for Storybook? If so, what does it need to look like?
… On Feb 16, 2021, at 6:19 PM, Michael Shilman ***@***.***> wrote:
This project has a variety of issues:
It's missing dev dependencies on react-dom / react / @material-ui/core
It overrides the babel config in a way that's incompatible with storybook
If I add those peer dependencies as dev dependencies and remove the babel config, Storybook loads the CLI-generated stories. There are still problems with the stories in the repo, but I didn't have time to debug them.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I was thinking dependencies rather than dev dependencies.
There is no issue with having react in dev dependencies and peer dependencies so I will do that.
Any docs on what works or doesn’t work in the Babel config?
… On Feb 16, 2021, at 7:33 PM, Michael Shilman ***@***.***> wrote:
why aren't dev dependencies appropriate in an npm package?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Launching Storkbook displays a warning message, and the UI says that their are no stories configured.
Steps to reproduce the behavior:
npm ci
to install dependencies.npx sb init
as described in the Storybook installation guide.npm run storybook
The
npx sb init
command added some example stories to astories
folder. I would expect these stories to show up at least in the UI. My own components also have stories defined for them.I also tried
npx sb init --type react
but this made no difference.Beta Was this translation helpful? Give feedback.
All reactions