-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Storybook comes up empty with 6.4.0-alpha.20 and later (it's ok up to 6.4.0-alpha.19) #15746
Comments
ok, @shilman I've taken a bit of a look through the code, and this definitely looks like a regression in #15399. I think the problem is in /lib/core-common/src/utils/to-require-context.ts, here:
{
path: '/a/b',
recursive: true,
match: '^\\.\\/(?:\\/c\\.js)$'
} and this does not produce any matches even though the file exists. I tried changing line 36,
{
path: '/a/b',
recursive: false,
match: '^\\.\\/(?:c\\.js)$'
} and this works just fine. In fact, with the above change to line 36, our whole storybook works just fine on 6.4.0-alpha.23. However, I do not feel confident enough in my understanding of all the possible paths through this glob code to propose this as a PR -- I'd much prefer someone who understands the code takes a look first! However, I hope the above helps. |
@dcwarwick thanks for tracking this down! @lkuechler any chance you can follow up on this? ☝️ |
@shilman I will have a look at this today |
@shilman I have created a PR that should solve this issue. #15775 @dcwarwick thank you for the detailed analysis and the suggestion on how to solve this. Could you check if the test really matches with the issue that you where having? |
Huzzah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.25 containing PR #15775 that references this issue. Upgrade today to the
|
Bzing! Thanks @lkuechler @shilman Alpha 25 works fine for our storybook now :-) and the FAST_REFRESH=true that started all this looks good too :-) |
Describe the bug
When I update the version of @storybook/react and related @storybook packages to 6.4.0-alpha.20 or above, my storybook comes up empty. With previous versions of storybook, up to and including 6.4.0-alpha.19, it comes up fine with stories in. I wonder if there is a regression in #15399. NB our storybook is produced with a list of explicit files, not a glob.
To Reproduce
Here is a cut-down version of our repo:
https://github.com/dcwarwick/ibm-cloud-cognitive/tree/storybook-640alpha20
To reproduce:
yarn
andyarn:storybook
If the @storybook versions in /packages/core/package.json are pulled back to 6.4.0-alpha.19 or below,
yarn:storybook
will produce a storybook with stories in as expected.Here is a running instance of the above branch:
https://deploy-preview-1108--ibm-cloud-cognitive.netlify.app/
Here is a running instance of the full repo using @storybook version 6.3.6:
https://ibm-cloud-cognitive.netlify.app/?path=/story/cloud-cognitive-released-aboutmodal--about-modal
System
Please paste the results of
npx sb@next info
here.Additional context
The storybook configuration files are all in /packages/core.
I've produced a cut-down version of our real-life case rather than attempting to make a minimal reproduction, as I suspect there is something significant in the way we have configured storybook and it might be difficult to recreate that from scratch.
Here is the
module.exports
from our main.js:The text was updated successfully, but these errors were encountered: