question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[storybook] no .stories generated?

See original GitHub issue

Expected 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

5reactions
evtkcommented, Dec 4, 2019

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.

1reaction
isaacplmanncommented, Dec 2, 2019

What *.module.ts files are in the root level of that library? The stories schematic is currently dumbly taking the first *.module.ts file it finds and looking for a declarations array on it.

I’d like to add an optional parameter to specify the module file manually.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found