#Storybook installing missing components

13 messages · Page 1 of 1 (latest)

worn moth
#

Hello i just followed your instruction and running into a problem where the storybook components will not be find and all HTML elements of storybook are throwing errors.

I just got into the root of my project and installed it but i guess something is wrong in the way storybook is searching for modules but i dont get it.
If you have any solutions to that i would be happy and thankful 🙂

worn moth
#

after installing:

#

Import throwing error:

#

Hovering over <button>

austere hazel
#

The screenshot showing option warnings and an error, I am not sure about.

The bottom two screenshots show problems that I thought were already fixed, but seems like it isn't. The button component should have standalone: true in the @Component decorator.

That stories/ folder, that has the button component in it, are just some examples that are added to a new project. I normally just remove them and add stories for my components.

worn moth
#

A mate of my company has non of those error messages when he pulled my project
I guess its something related to my vscodium

#

adding standalone fixed it for the button component but not for the other .ts files
I mean i could delete all but i dont know, it feels like doding problems

#

i love solving them🧐

austere hazel
#

I have seen them in before, I can find the other fixes in a sec. They are small.

#

If he doesn't see the errors, he may not have the same Angular extensions. The stories don't error, because of how Storybook loads them at runtime, in a way that happens to let those minor problems work.

#

The fixes:

I think you can remove the imports from the button's @Component, if you don't care about it being standalone.

If you want the button standalone, to have a mix of standalone/non-standalone then add standalone: true to @Component in button.component.ts. In header.stories.ts and page.stories.ts, move Button from declarations to imports.

worn moth
#

btw thx for the support

#

i see that my mates storybook throws no error because hes not using the angular language service