[storybook] no .stories generated?
See original GitHub issueExpected Behavior
Please describe the behavior you are expecting
Current Behavior
Running:
npm run nx g @nrwl/angular:storybook-configuration shared-components
or
ng g stories shared-components
should generate .stories files for my (ui)-components.
What is the current behavior?
When running the first command: no stories are generated and when running the second command afterwards I receive:
Nothing to be done.
Context
- I’m running the latest NX (8.8.3) nothin fancy here.
- Library contains simple ui-components, but styling or styleUrls is included (don’t know if that may play a part)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Storybook does not show any stories! · Issue #13811 - GitHub
I tried adding Storybook into a newer project. I have used Storybook before, but the last version I was running was 5.3.18.
Read more >Configure Storybook
Generates a stories.json file to help story loading with the on demand mode. features: { buildStoriesJson: true }. emotionAlias, Provides ...
Read more >How to troubleshoot storybook not loading stories?
The main.js in your ./storybook folder contains the line stories: ['../src/**/*.stories.jsx?'], since your story is named ...
Read more >Set up Storybook for React Projects - Nx
You can generate Storybook configuration for an individual React project with ... generate *.stories.ts files for each component declared in the library.
Read more >Writing Stories - Storybook
There are no rules for this, but in general, stories are easier to maintain when they ... to automatically generate the import statements...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

ahhh that explains. We don’t work with root modules, but instead libraries export multiple modules.
I suppose a search for any .module.ts file in the lib should be the way to have this fixed.
What
*.module.tsfiles are in the root level of that library? The stories schematic is currently dumbly taking the first*.module.tsfile it finds and looking for adeclarationsarray on it.I’d like to add an optional parameter to specify the module file manually.