Open algoflows opened 9 months ago
I am not seeing this in a minimal setup. Here's a sandbox that works fine with Storybook 8 and this addon: https://stackblitz.com/edit/github-mbaaau-wqykp4?file=src%2FButton.stories.svelte
Could you provide a minimal reproduction with a repo that I can check out?
Here are docs on how to create a minimal reproduction locally https://storybook.js.org/docs/contribute/how-to-reproduce, alternatively you can use https://storybook.new to create a minimal reproduction in StackBlitz.
Storybook sandboxes are just a given framework (in this case Svelte + Vite) with storybook@next init
ran in it, which is as minimal as it gets.
I ran into this issue. I found that a fix was to remove the getAbsolutePath
addons: [
'@storybook/addon-svelte-csf',
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@chromatic-com/storybook'),
getAbsolutePath('@storybook/addon-interactions')
],
I ran into this issue. I found that a fix was to remove the getAbsolutePath
addons: [ '@storybook/addon-svelte-csf', getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-essentials'), getAbsolutePath('@chromatic-com/storybook'), getAbsolutePath('@storybook/addon-interactions') ],
This works for me as well
The op's issue is because he is using a monorepo called moonrepo
I can confirm this is also bugged with turborepo, and the fix is the same.
@ChrisKnightLDN Fixed my immediate issue and the server was able to start (I am also using turborepo sveltekit), but then I got a different error after the server started up:
On the server:
[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
File: /Users/repo/src/voltage/frontend-turbo/node_modules/@storybook/svelte/dist/components/PreviewRender.svelte:56:9
54 | });
55 | }
56 | </script>
| ^
57 |
58 | <SlotDecorator {Component} {props} on={{ ...eventsFromArgTypes, ...on }} />
at formatError (file:///Users/repo/src/voltage/frontend-turbo/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:42645:46)
at TransformContext.error (file:///Users/repo/src/voltage/frontend-turbo/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:42641:19)
at TransformContext.transform (file:///Users/repo/src/voltage/frontend-turbo/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:40447:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.transform (file:///Users/repo/src/voltage/frontend-turbo/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:42919:30)
at async loadAndTransform (file:///Users/repo/src/voltage/frontend-turbo/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53385:29)
On the client:
Failed to fetch dynamically imported module: http://localhost:6006/node_modules/.cache/storybook/e86cc1ca60d8344c818e5bad4c91dc8957e7a32e6dbce0e86007cd2d02723fb1/sb-vite/deps/@storybook_svelte_dist_entry-preview__mjs.js?v=22c5d45c
Having a similar issue.
8.4.3
for everything Storybook relatedvite@5.2.13
svelte@5.0.0-next.243
Source files: https://github.com/gitbutlerapp/gitbutler/compare/master...svelte-csf
@ndom91 based on the error shown that looks unrelated to this, could you open a new issue?
Describe the bug
A clear and concise description of what the bug is.
Steps to reproduce the behavior
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots and/or logs
Environment
Additional context
Add any other context about the problem here.