Storybook usage with existing project #29688
Unanswered
painkkiller
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some problems with using storybook in existing project. I can't make reproducible repo, but I hope it will ring a bell for someone.
So project was generated with nx.
I've configured storybook with command
nx g @nx/react:storybook-configuration project-name
, in my case project-name is ui.I've got structure shown on screenshot:
So far so good. When I try to start storybook with
nx run ui:storybook
I see my storybook is empty, Couldn't find any stories in your Storybook.Ok. I am trying to generate stories for components
nx @nx/react:stories --project=ui --target=storybook
. I tried a lot of different options, I see no errors, but no generated story files as well.I've tried to write story files on my own. I've tried something like this (in different variations but with the same result):
Then I start
nx run ui:storybook
and I am getting error:Ok? problem with makeTitle. Google lead me to this page https://storybook.js.org/docs/api/main-config/main-config-indexers#title
And I've found that all examples of code provided there not works and contain errors.
So I m really stuck here, would appreciate any help.
Beta Was this translation helpful? Give feedback.
All reactions