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
Angular storybook does not start up on 5.0.0-alpha.0 @next #5235
Comments
Sounds similar to the issue that @expe-lbenychou (<- is that right?) was experiencing with this branch. The need for generators is due to some new code using I don't really have a lot of context of what needs to change here. Of course backing out the use of Are you interested in taking a look @CodeByAlex? |
I wonder why this does not happen in the angular-cli example app? |
Hey @tmeasday, Is there a live url for the angular 5.0 demo? If that is indeed working, maybe I am missing a dependency of some kind. I did try to include the babel polyphills this morning but that didn't seem to work. |
@CodeByAlex sure, it is here: https://5c3cd236f7d2300008933e0c--storybooks-angular.netlify.com/?path=/components/welcome--to-storybook This is the |
You may want to check out |
@tmeasday at some point some of the example apps disabled the DLL option to enable faster rebuild (a la |
Let's wait to hear if @CodeByAlex is still seeing the problem in the latest alpha |
@CodeByAlex -- I have occasionally seen webpack hang like that, are you sure it didn't work if you stopped and restarted it (with Regarding the |
Not sure if this info helps anyone, but i just wanted to give the new storybook ui a test run and got the exactly same errors as posted above (but with edit: actually upgrading to alpha.3 worked now :/ not sure what fixed the issue. seems like running npm i multiple times, did the trick. |
Yeah, I tried switching back and forth between alpha.2 and alpha.3 and every time I went to alpha.3, it never started listening to the port. This is all I am using to import the stories which worked in the 4.0 version: const importAll = (r) => r.keys().forEach(r); const loadStories = () => { // set the a11y configuration to only look for the specified rules addDecorator(checkA11y); configure(loadStories, module); @sakulstra, are you seeing components now that you bumped your version back down to alpha.2? |
@CodeByAlex -- so you aren't seeing any errors in the console that look like they might come from your story files loading? Could you try putting logs inside one of your story files to see if it runs completely? I wonder if its possible you have more than one copy of |
Could this be the explanation for the hanging: #5268? |
After some debugging, I found that the reason why the components were not loading was that I was loading my a11y configuration before the stories. configure(loadStories, module); // set the a11y configuration to only look for the specified rules Something must have changed so that now the ordering matters *I was able to fix the startup issue by bumping to alpha.4 Thank you! |
Let's close this one and follow the issues we've discovered in #5270 and #5268 (<- you can double check this @CodeByAlex by running |
In V5 this is how you configure addon-a11y: Sorry this example is for react, but import React from 'react';
import { storiesOf, addDecorator, addParameters } from '@storybook/react';
import { withA11Y } from '@storybook/addon-a11y';
addDecorator(withA11Y)
addParameters({
a11y: {
// ... axe options
element: '#root', // optional selector which element to inspect
},
});
storiesOf('button', module)
.add('Accessible', () => (
<button style={{ backgroundColor: 'black', color: 'white', }}>
Accessible button
</button>
))
.add('Inaccessible', () => (
<button style={{ backgroundColor: 'black', color: 'black', }}>
Inaccessible button
</button>
)); for all axe.run options, see here: If you want the a11y parameter to be different per story you can do that too. storiesOf('button', module)
.add('Accessible', () => (
<button style={{ backgroundColor: 'black', color: 'white', }}>
Accessible button
</button>
), {
a11y: {},
}); |
@ndelangen can we retain backwards compatibility (and deprecate) in this release? |
Yo-ho-ho!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-alpha.7 containing PR #5302 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the |
Describe the bug
When starting the storybook application in an angular environment, the storybook compiles but when the page is opened in the browser, nothing is displayed in the window and errors are seen in the console stating the the regeneratorRuntime is not defined.
To Reproduce
Steps to reproduce the behavior:
npm run start-storybook -p 9001 -c .storybook
Expected behavior
The application should start up without error and show components
Screenshots
Below is a screenshot of the errors that occur on start up with no components being displayed
System:
The text was updated successfully, but these errors were encountered: