-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Angular 19: Unexpected Component found in the "declarations" array of the "StorybookComponentModule" NgModule #29671
Comments
Still happening in v8.5.0-alpha.9 which claims to support Angular 19. |
This is because the Created a stackoverflow issue for this too: |
I opened a PR that fixes this issue: |
Hi man thanks, it work for me 👌👌👌👌 |
Still not fixed |
Are you using version |
For me the issue fixed with version |
Describe the bug
When creating a story for a standalone component in Angular 19, it fails because the renderer tries to create an NgModule with the standalone component in its declarations array. This causes an error because standalone components can't be declared in any NgModule.
Reproduction link
https://stackblitz.com/edit/github-kskywf?file=src%2Fstories%2Fbutton.stories.ts
Reproduction steps
System
Additional context
A dirty fix to get it working is to not provide the component via the "component" option, but rather via the decorators property like this:
We would not like to do it this way because it loses the ability to infer the argTypes
The text was updated successfully, but these errors were encountered: