learn.svelte.dev
learn.svelte.dev copied to clipboard
SvelteKit data loading exercises are flaky: the +page.server.js file seems not to be loaded
The reproduction is not reliable it sometimes happens, sometimes not. @EmilTholin has seen it happen once and gone. I see it consistently in one browser and never see it in another.
Exercise: https://learn.svelte.dev/tutorial/page-data
Reproduction steps:
- Click Solve
The app crashes with:
My screenshot:
@EmilTholin's screenshot:
When I do console.log(data)
in src/routes/blog/+page.svelte
, I can see that the object is empty.
When I do console.log(posts)
inside load()
in src/routes/blog/+page.server.js
, I can see that logging does not happen at all.
@EmilTholin's guess is that the +page.server.js
is missing from the virtual filesystem.
Discussion: https://discord.com/channels/457912077277855764/1063518400132956211