New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svelte 5 Hydration mismatch (with adapter-static) #11509
Comments
If you open the dev tools and enable pause on exception, it should stop on the error that occurs that is causing the hydration error. Can you show what that is please? Also interestingly, it seems that |
I don't know if it can be of any help, but I had the first mentioned error. It occurred only when SSR was disabled. And after updating vite, svelte-kit, and the adapter to the latest version, it fixed the issue. This is a simplified setup that causes the error:
{
...
"devDependencies": {
"@sveltejs/adapter-node": "^1.0.0",
"@sveltejs/kit": "^1.20.4",
"svelte": "^5.0.0-next.125",
"vite": "^4.0.0"
}
}
export const ssr = false;
<h1>Hello</h1> |
I havent been able to reproduce it in an isolated situation working from an empty project yet... I need to take some time probably next week to start from my app situation and break it down. |
Please can you try the latest version of Svelte 5. |
Sounds like your node_modules might need removing and re-installing. It looks like you removed vite-plugin-svelte too? |
Almost positive I already did that, but will try again tomorrow |
Hi... In my project i keep getting this. Guess it depends on too many moving parts. Within my project I have been able to stop causing the problem by making some small changes to my pages/components But it remains weird to me that it throws Cannot read properties of null (reading 'name') in below situation I am going to park this for now, so feel free to close the issue. |
If you render you app without SSR, does that error go away? |
Describe the bug
Using Svelte 5 with my unchanged (working) Svelte(Kit) Application throws an error.
Not sure how to explain what happens, but a clue could be that I use adapter static?
Reproduction
I dont have the time at the moment to produce a clean reproduction scenario, hopefully there are enough clues from the screenshot.
Maybe I just needed to update some of the related packages?
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: