learn.svelte.dev icon indicating copy to clipboard operation
learn.svelte.dev copied to clipboard

SvelteKit data loading exercises are flaky: the +page.server.js file seems not to be loaded

Open lolmaus opened this issue 2 years ago • 1 comments

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:

  1. Click Solve

The app crashes with:

My screenshot:

image

@EmilTholin's screenshot:

image

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.

lolmaus avatar Jan 13 '23 18:01 lolmaus

Discussion: https://discord.com/channels/457912077277855764/1063518400132956211

lolmaus avatar Jan 13 '23 18:01 lolmaus