Blank page inside layout slot (+page.svelte not shown)
Describe the bug
Hi,
Yesterday my project was running fine. I did maybe update some packages :
- autoprefixer 10.4.17 => 10.4.18
- prettier-plugin-svelte 3.2.1 => 3.2.2
- svelte-check 3.6.4 => 3.6.6
- typescript 5.3.3 => 5.4.2
- vite 5.1.4 => 5.1.5
This morning, I just lauch my project and inside one of my root, I have a layout and a slot inside it.
This works inside +layout.svelte
Test string is showing here in +layout.svelte
<slot />
but this doesn’t in +page.svelte
Test string is not showing here in +page.svelte
I could make it work by just copy/pasting content of +page.svelte, delete it, and recreate a file called +page.svelte and pasting previous content.
But it breaks again when leaving then relaunching npm run dev
I tried reverting packages update but it does the same…
Reproduction
I have no idea how to reproduce. Happens only on the local version of my app.
Logs
No logs
System Info
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
Memory: 4.40 GB / 15.69 GB
Binaries:
Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (122.0.2365.66)
Internet Explorer: 11.0.22621.1
npmPackages:
@sveltejs/adapter-auto: ^3.1.1 => 3.1.1
@sveltejs/adapter-cloudflare: ^4.1.0 => 4.1.0
@sveltejs/kit: ^2.5.2 => 2.5.2
@sveltejs/vite-plugin-svelte: ^3.0.2 => 3.0.2
svelte: ^4.2.12 => 4.2.12
vite: ^5.1.4 => 5.1.5
Severity
annoyance
Additional Information
No response
Does it happen in incognito mode?
I've recently experienced layout breaking in vite dev.
Workaround was to disable cache in the dev tools network tab and reload.
No incognito mode Finally I created a false page with a +layout.svelte in a random place in my project and this fixed my issue. I’ll later if I try to delete this if it does the same. I will try to disable cache as you suggested.
On Sun, Mar 10, 2024 at 12:27 PM Hyunbin @.***> wrote:
Does it happen in incognito mode?
I've recently experienced layout breaking in vite dev.
Workaround was to disable cache in the dev tools network tab and reload.
— Reply to this email directly, view it on GitHub https://github.com/sveltejs/kit/issues/11954#issuecomment-1987192833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATFKSVZNZS5HX2CBU4LYBNDYXQ7S3AVCNFSM6AAAAABEMU2XA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGE4TEOBTGM . You are receiving this because you authored the thread.Message ID: @.***>
Hello,
We have the exact same problem on a SvelteKit project with Svelte 5. I have no idea what is causing this, disabling the cache and so on does nothing. Even rebooting the project from scratch. It's also worth noting that this only happens during dev mode, not preview.
npm vite --force