Skip to content
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

Blank page inside layout slot (+page.svelte not shown) #11954

Closed
Nelhoa opened this issue Mar 8, 2024 · 4 comments
Closed

Blank page inside layout slot (+page.svelte not shown) #11954

Nelhoa opened this issue Mar 8, 2024 · 4 comments

Comments

@Nelhoa
Copy link

Nelhoa commented Mar 8, 2024

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

@hyunbinseo
Copy link
Contributor

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.

@Nelhoa
Copy link
Author

Nelhoa commented Mar 10, 2024 via email

@YummYume
Copy link

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.

@eltigerchino eltigerchino closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2024
@Puigdemunt
Copy link

npm vite --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants