404 - Storybook cannot find components
See original GitHub issueDescription Dev server works with the exact same config but Storybook seems to struggle.
Strange log as I don’t use JSX or TSX
Plugin: vite:import-analysis
16:13:41 [vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
Plugin: vite:import-analysis
and the browser console logs 404
GET http://localhost:6006/src/stories/BasicHeader.vue?vue&type=div&index=0&lang.div net::ERR_ABORTED 404 (Not Found)
To Reproduce
Please create a reproduction by running yarn && yarn storybook
Repo can be found at https://github.com/Miguel-Bento-Github/vite-vue-ts-storybook
Environment Info:
System:
OS: macOS 12.0.1
CPU: (8) arm64 Apple M1
Binaries:
Node: 16.9.1 - /usr/local/bin/node
Yarn: 1.22.15 - /opt/homebrew/bin/yarn
npm: 7.21.1 - /usr/local/bin/npm
Browsers:
Chrome: 96.0.4664.55
Firefox: 94.0.2
Safari: 15.1
npmPackages:
@storybook/addon-a11y: ^6.4.3 => 6.4.3
@storybook/addon-actions: ^6.4.3 => 6.4.3
@storybook/addon-essentials: ^6.4.3 => 6.4.3
@storybook/addon-links: ^6.4.3 => 6.4.3
@storybook/vue3: ^6.4.3 => 6.4.3
Help is appreciated in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Storybook cannot find components 404 · Issue #16860 - GitHub
Describe the bug Dev server works with the exact same config but Storybook seems to struggle. Strange log as I don't use JSX...
Read more >Storybook javascript GET 404 (Not Found) error about ...
I need to fix a Storybook with stories, it's broken (it's unclear when it was broken, probably after some angular upgrades a while...
Read more >Storybook Composition
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >Error Boundaries - React
These errors were always caused by an earlier error in the application code, but React did not provide a way to handle them...
Read more >Using Storybook and Mock Service Worker for mocked API ...
While that is a valid part of the component's behavior, the HTTP request it makes doesn't belong in Storybook. Making actual requests in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It does look like that’s what you’re hitting. I don’t think another issue would help, since there’s already a PR open. It’s probably best to give it a little time, or try to find a workaround to remove the types or ignore the errors for now until it is fixed.
It looks like your
viteFinal
is not quite right. You can remove thevue()
plugin because the storybook builder already includes it and you’ll end up with a duplicate, and you need to specify options to thevueI18n
plugin:When I make that change, storybook builds correctly. Let me know if you still have any issues though.