-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Labels
Description
Describe the bug
Svelte just recently released the Async Svelte, allowing for usage of await
in many places in Svelte components.
When trying to use Storybook in a project that is utilizing this feature, currently only available through an experimental
compiler option, storybook breaks on every component, even the example ones storybook creates when initializing a project.
Reproduction link
https://github.com/jhechtf/storybook-svelte-5-repro
Reproduction steps
- Create a new svelte project with
pnpx sv create
, choose minimal and tailwindcss. - Add in storybook with
pnpx storybook@latest init
- Edit
svelte.config.js
to have the followingcompilerOptions
const config = {
preprocess: vitePreprocess(),
compilerOptions: {
// Enable run-time checks when not in production
experimental: {
async: true,
}
},
kit: {
adapter: adapter({
fallback: "index.html",
}),
},
};
export default config
- Try to run storybook with
pnpm storybook
. The page will open and you will find the following error


System
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Binaries:
Node: 24.4.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 11.4.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.6.0 - C:\Program Files\nodejs\pnpm.CMD <----- active
Browsers:
Chrome: 139.0.7258.128
Edge: Chromium (139.0.3405.86)
npmPackages:
@storybook/addon-svelte-csf: 5.0.7 => 5.0.7
@storybook/addon-vitest: 9.1.2 => 9.1.2
@storybook/sveltekit: 9.1.2 => 9.1.2
storybook: 9.1.2 => 9.1.2
Additional context
No response
dosubot and o2ba