Closed viveleroi closed 2 years ago
Seems like a windows bug. @joshwooding Is this something you can look into?
Here is the full stack trace if it helps:
WSD-2DXW4M3: myproject-v3 (components) $ yarn run storybook
@storybook/cli v7.0.0-alpha.47
info => Loading presets
info => Loading presets
info => Loading presets
info => Starting manager..
WARN 🚨 Extraction error on app\components\buttons\buttons.docs.mdx: Error: Could not find "./buttons.stories" for docs file "app\components\buttons\buttons.docs.mdx".
C:\Users\mbotsko\Desktop\projects\myproject-v3\.yarn\__virtual__\@storybook-core-server-virtual-23951462ea\0\cache\@storybook-core-server-npm-7.0.0-alpha.47-4f2e47bbae-da8f15be91.zip\node_modules\@storybook\core-server\dist\cjs\utils\StoryIndexGenerator.js:314
if (!ofTitle) throw new Error(`Could not find "${result.of}" for docs file "${relativePath}".`);
^
Error: Could not find "./buttons.stories" for docs file "app\components\buttons\buttons.docs.mdx".
at StoryIndexGenerator.extractDocs (C:\Users\mbotsko\Desktop\projects\myproject-v3\.yarn\__virtual__\@storybook-core-server-virtual-23951462ea\0\cache\@storybook-core-server-npm-7.0.0-alpha.47-4f2e47bbae-da8f15be91.zip\node_modules\@storybook\core-server\dist\cjs\utils\StoryIndexGenerator.js:314:29)
at async C:\Users\mbotsko\Desktop\projects\myproject-v3\.yarn\__virtual__\@storybook-core-server-virtual-23951462ea\0\cache\@storybook-core-server-npm-7.0.0-alpha.47-4f2e47bbae-da8f15be91.zip\node_modules\@storybook\core-server\dist\cjs\utils\StoryIndexGenerator.js:123:31
at async Promise.all (index 0)
at async Promise.all (index 0)
at async StoryIndexGenerator.updateExtracted (C:\Users\mbotsko\Desktop\projects\myproject-v3\.yarn\__virtual__\@storybook-core-server-virtual-23951462ea\0\cache\@storybook-core-server-npm-7.0.0-alpha.47-4f2e47bbae-da8f15be91.zip\node_modules\@storybook\core-server\dist\cjs\utils\StoryIndexGenerator.js:118:5)
at async StoryIndexGenerator.ensureExtracted (C:\Users\mbotsko\Desktop\projects\myproject-v3\.yarn\__virtual__\@storybook-core-server-virtual-23951462ea\0\cache\@storybook-core-server-npm-7.0.0-alpha.47-4f2e47bbae-da8f15be91.zip\node_modules\@storybook\core-server\dist\cjs\utils\StoryIndexGenerator.js:144:7)
at async StoryIndexGenerator.initialize (C:\Users\mbotsko\Desktop\projects\myproject-v3\.yarn\__virtual__\@storybook-core-server-virtual-23951462ea\0\cache\@storybook-core-server-npm-7.0.0-alpha.47-4f2e47bbae-da8f15be91.zip\node_modules\@storybook\core-server\dist\cjs\utils\StoryIndexGenerator.js:108:5)
Reproduced and have a fix :) Will raise a PR soon
Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.50 containing PR #19777 that references this issue. Upgrade today to the @next
NPM tag to try it out!
npx sb upgrade --prerelease
Closing this issue. Please re-open if you think there's still more to do.
Describe the bug
Using storybook v7 alpha 47 with the vite builder. When attempting to run storybook I get the following error when trying to import a stories file. The file exists, it's in the same directory, so I can't find a cause on my end for this error.
Extraction error on app\components\buttons\buttons.docs.mdx: Error: Could not find "./buttons.stories" for docs file "app\components\buttons\buttons.docs.mdx
My file structure in components/buttons is:
In the mdx file, I am using this import per the 7 alpha migration docs:
import * as ButtonStories from './buttons.stories';
I have also tried it with the
.tsx
file extension, produces the same error.To Reproduce
System