-
-
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]: Storybook unable to locate stories when special characters are used in path to working directory in v.7.0.0-rc3. #21636
Comments
@unitario thanks for filing & coming up with a potential fix. any chance you can submit a PR? we can give it a thorough test before merging. 🙏 |
@shilman I could but it might take while (one or two weeks due to traveling). I suggest you label this "good first issues" and if no takers then I'll look into it at when available? |
Ok we'll probably take this one then to get it out as part of 7.0. Thanks for letting me know! |
@caiotracera that would be wonderful! 🙏 Please check out how to contribute in our docs and feel free to ask questions in |
I can grab this. Feel free to assign me, @shilman. 😊 |
Describe the bug
If the path to Storybook contains special characters the glob lookup fails with a warning saying that no story could be found using pattern.
The problem is the concatenation of of the
fullGlob
which include the working directory:storybook/code/lib/core-server/src/utils/StoryIndexGenerator.ts
Lines 121 to 123 in 2d280e6
That means if there are special characters in that path like parenthesis those will be processed as a glob pattern:
storybook/code/lib/core-server/src/utils/StoryIndexGenerator.ts
Line 124 in 2d280e6
Possible solution could be by changing this:
To this:
I have monkey patched it and works fine.
To Reproduce
Put Storybook in a working directory that contains special characters like
/Users/User/Special (1)/
and serve Storybook.System
Additional context
No response
The text was updated successfully, but these errors were encountered: