Hi I am trying to get aurelia 2 working with storybook but no luck
Has anyone got this working recently.
I have setup storybook recently with react so I know how its supposed to be done I think.
I have tried using aurelia with and without typescript but it still fails on storybook startup.
Some example errors
If you have ‘reflect-metadata’ or any other reflect polyfill
R in C:/Users/pclark/Desktop/aurelia-sb-no-ts/aurelia-sb/node_modules/@aurelia/runtime-html/dist/resources/attribute-pattern.d.ts
ERROR in C:/Users/pclark/Desktop/aurelia-sb-no-ts/aurelia-sb/node_modules/@aurelia/runtime-html/dist/resources/attribute-pattern.d.ts(20,16):
TS2304: Cannot find name ‘State’.
TS6053: File ‘%SET_DURING_SB_INIT%’ not found.
Additionally who owns the plugin for aurelia storybook aurelia team or storybook team
2 Likes
I think using storybook with Aurelia shouldn’t be difficult, and no one is really “owning” the storybook part in the team. I’ll have a look at the reflect metadata issue and setup an example storybook.
1 Like
Thanks bigopon spent a fair bit of time on this but dont feel I am getting anywhere even though the error looks suspiciously similar to the issue I had with controls library.
I tried upgrading the version of aurelia under storyook and excluding the storybook node_modues folders but no luck
1 Like
Hi guys,
I’m very interested in a solution for this as well. I’m running into the same errors as @Infuser1. I’m willing to do some work on supporting this if it’s needed
1 Like
The strictness in guaranteeing the metadata is good was added without considering the scenarios like this. I think it’s ok to relaxed it a little bit, as it’s used in our kernel. Will update on this soon.
2 Likes
Thanks again for looking at this bigopon sure you and the team are really busy at the moment
1 Like
A commit that relax the strictness around metadata has been merged. Can you try again @infuser @chicken-suop
1 Like
Thanks Bigopon will take a look but might be tomorrow got a lot on at the moment
1 Like
I will pick this up now that we are alpha. I got us into the SB repo and then didn’t want to keep iterating forever to keep it up to date with constantly changing APIs. Now that we are alpha and most of the apis are concrete I will keep maintaining it. I have direct connection to the SB owners and we work together. Once released they will promote AU2 like their other frameworks.
4 Likes
Thanks Brandon sorry not had time to try this yet bigopon, but still plan too although seems like we are now going standard vanilla web components so don’t need it.
I will get web components done then try this
The team that I’m on is very excited to use Storybook on our current Aurelia 2 project, but we’re still receiving the following errors:
TS6053: File ‘%SET_DURING_SB_INIT%’ not found.
TS2304: Cannot find name ‘State’.
Are there any updates or suggestions that people have had luck with?
I am late to the party here, but I got this working.
Add your project under packages-adapters. I used below and created a type script plugin
npx makes aurelia
Have a look at package-adapters/json-editor to se an example how you can add your stories.
Once Aurelia 2 officially exits beta, we should be able to get an official Storybook plugin going or whatever. There’s been a bit of change in the structure of the plugins/frameworks over there and Aurelia got kicked out because it was a Storybook setup for one of the Aurelia alphas and they wanted something more stable
That said - we’re using the ekzo fork and loving it, made an impact in our business for sure.
2 Likes