-
-
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
[Bug]: Could not load stories from Storybook v7.0.0-beta.47 with vue3 + vite in Windows #21101
Comments
I'm getting the same error and managed to pinpoint it down to |
It's true. The error was introduced here: |
Ok, the problem is related of using posix with a config directory in Win32 format: It's using a mix of slashes, options.configDir has a windows format, but pattern is with posix format, so the final result is like:
when it was waiting for something like /Users/user.dot.name/folder/storybook-sandboxes/vue3-vite/default-ts/after-storybook/src/**/*.mdx That's because the options.configDir is And also, glob still retuning absolute paths from each file in windows format, but the code is waiting a posix format. So, in the map, for each file, we need to transform into posix to fix the problem. I did it a simple test returning an array string like
And it's working. |
Instead of using posixPath we should just use |
It's still a problem in |
Also still seeing this issue in 7.0.0-beta.53 |
cc @IanVS |
It's still there on version 7.0.0-beta.55
The absolute path generated is wrong. More context: I'm using the mentioned version with the following packages:
I just updated storybook to see if it changed anything. I'll try updating other packages as well. |
@IanVS the bug is already found AFAICT: @sfe-efficy wrote:
It's exactly this change which broke it. I did test reverting that manually simply by changing the installed lib: It does work. |
@gipoezcan, it's been suggested to use |
@IanVS sure of course, thanks for the offer, let me try |
@IanVS I opened a PR, tests seem to pass. With that change they pass on Windows as well :) This is the first time I've ever touched yarn so took a bit setting up then a long time to realize the lint check failed. Well, all is fixed now, at least AFAICT |
Closes #21101 ## What I did use the slash package instead of posix path ## How to test 1. check out the repository in windows 2. run yarn task --task build --template react-vite/default-ts --start-from=install 3. it should work --> ## Checklist **Help**: not sure about how to test this - [ ] Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests) #### Maintainers - [ ] If this PR should be tested against many or all sandboxes, make sure to add the `ci:merged` or `ci:daily` GH label to it. - [ ] Make sure this PR contains **one** of the labels below. `["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]`
Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.59 containing PR #21305 that references this issue. Upgrade today to the
|
I upgraded to the beta.59 and both the dev and the build commands worked without errors. Thanks for the fast merge! |
Describe the bug
Using Vue3 + Vite for storybook v7.0.0-beta.47 report and error trying to import each story in Windows:
[unplugin-csf] Could not load /src/stories/Button.stories.ts (imported by ../../../../../../../../virtual:/@storybook/builder-vite/storybook-stories.js): ENOENT: no such file or directory, open 'C:\src\stories\Button.stories.ts'
It's ignoring the working directoy, and tries to load the content from C:\ root folder.
To Reproduce
System
Additional context
I'm having the same problem in my project, so I was looking for a sandbox configuration for vue3 +vite for Storybook v7.
I simplily run:
The text was updated successfully, but these errors were encountered: