You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Svelte for the past few months, so I'm not sure if this is caused by bad practice, or an actual issue. It was not present in 5.27.0, so it looks like an issue.
I'm basically using context to store Snippets so I can hot swap parts of the layout based on the page. This worked fine until today when I updated from 5.27.0 to 5.27.1.
It looks to be working fine if the content is static (just regular HTML, text) , but it breaks once a $state variable is used in the Snippet.
ReferenceError: Cannot access 'sidebar' before initialization
at _page (/home/catalin/Development/bugs/svelte-slot-test-main/src/routes/test/+page.svelte:4:13)
at eval (/home/catalin/Development/bugs/svelte-slot-test-main/.svelte-kit/generated/root.svelte:66:5)
at _layout (/home/catalin/Development/bugs/svelte-slot-test-main/src/routes/+layout.svelte:14:11)
at Root (/home/catalin/Development/bugs/svelte-slot-test-main/.svelte-kit/generated/root.svelte:61:3)
at render (/home/catalin/Development/bugs/svelte-slot-test-main/node_modules/.pnpm/[email protected]/node_modules/svelte/src/internal/server/index.js:88:2)
at Function._render [as render] (/home/catalin/Development/bugs/svelte-slot-test-main/node_modules/.pnpm/[email protected]/node_modules/svelte/src/legacy/legacy-server.js:27:24)
at render_response (/home/catalin/Development/bugs/svelte-slot-test-main/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_l_uydtfn24dfo5ird66jvbjiwfrm/node_modules/@sveltejs/kit/src/runtime/server/page/render.js:192:29)
at async render_page (/home/catalin/Development/bugs/svelte-slot-test-main/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_l_uydtfn24dfo5ird66jvbjiwfrm/node_modules/@sveltejs/kit/src/runtime/server/page/index.js:299:10)
at async resolve (/home/catalin/Development/bugs/svelte-slot-test-main/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_l_uydtfn24dfo5ird66jvbjiwfrm/node_modules/@sveltejs/kit/src/runtime/server/respond.js:499:18)
at async respond (/home/catalin/Development/bugs/svelte-slot-test-main/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_l_uydtfn24dfo5ird66jvbjiwfrm/node_modules/@sveltejs/kit/src/runtime/server/respond.js:363:20)
System Info
System:
OS: Linux 6.14 Fedora Linux 42 (Workstation Edition)
CPU: (16) x64 AMD Ryzen 7 7745HX with Radeon Graphics
Memory: 4.46 GB / 14.80 GB
Container: Yes
Shell: 5.2.37 - /bin/bash
Binaries:
Node: 22.12.0 - ~/.volta/tools/image/node/22.12.0/bin/node
npm: 10.9.0 - ~/.volta/tools/image/node/22.12.0/bin/npm
pnpm: 9.15.0 - ~/.volta/bin/pnpm
Browsers:
Brave Browser: 135.1.77.97
npmPackages:
svelte: ^5.27.1 => 5.27.1
This also has been tested on my work Macbook Pro M4 and the behaviour is the same.
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I've been using Svelte for the past few months, so I'm not sure if this is caused by bad practice, or an actual issue. It was not present in 5.27.0, so it looks like an issue.
I'm basically using context to store Snippets so I can hot swap parts of the layout based on the page. This worked fine until today when I updated from 5.27.0 to 5.27.1.
It looks to be working fine if the content is static (just regular HTML, text) , but it breaks once a
$state
variable is used in the Snippet.Reproduction
Repo: https://github.com/catalin-l/svelte-slot-test
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: