svelte: Svelte 5 next.179+: SSR regression
Edit: The described bug has been resolved, but there is a new one. It might be faster to simply skip to this comment: https://github.com/sveltejs/svelte/issues/13115#issuecomment-2330053369
Describe the bug
For some reasons, starting with Svelte 5 build 179 up to the last I have tested (next.241) I am getting this error when using SSR:
I have tried to pin point what in the DOM could be causing this but I was unsuccessful. Sometimes only wrapping something in a div trigger the error.
Reproduction
npm install -f
npm run dev
Svelte 5 build 178 works perfectly. Svelte 5 build 179 we get a first render then the error Svelte 5 build 180+ blank page identical error
Logs
No response
System Info
System:
OS: macOS 14.5
CPU: (12) arm64 Apple M3 Pro
Memory: 91.00 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.16.0/bin/yarn
npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
pnpm: 9.7.0 - ~/.nvm/versions/node/v20.16.0/bin/pnpm
Browsers:
Chrome: 128.0.6613.114
Safari: 17.5
npmPackages:
svelte: 5.0.0-next.178 => 5.0.0-next.178
Severity
blocking an upgrade
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 38 (25 by maintainers)
Hi @trueadm I am facing this exact issue after sveltekit svelte 5.0.0-next.178 and with ssr w.r.t web components. This is the repro. You can find bundled web component in static folder
@jamesst20 Thanks I got it working. When I remove the content from
Layout.svelteso its empty, why is the SSR content still including the content? Update: ah, I have to run one the scripts again.@jamesst20 I’m still digging into it. I’ll let you know when I find out more 😃
Thats good, I can look into that tomorrow. Is the repro updated to reflect your changes?