page props undefined , `Subpage undefined` SVELTE
any solution ?
12 Replies
You are using a outdated version of Kit?
Is there a reason for it? Cause you really should be using 1.0+ things have changed with routing and file structure.
I am following a tutorial from an year ago , maybe thats the issue 😦
Yea mate no go
oh wait that is old too
sec
YouTube
Learn SvelteKit
SvelteKit is the Swiss army knife of web frameworks for building resilient apps that run anywhere where JavaScript runs.
can my code not be salvaged some how ?
like the module part
You can try running the migration script
I would still start with a fresh create sveltekit app though.
You can also just copy the code inside the load() function as its just moved to a different spot now.
+page.js or +page.server.js
make sure you understand the difference though, they made these changes to be clear about what runs on server, client, both.
i think my svelte version is ok , its the code that is old :/
oh then that is def a issue xD
what version does it say in package.json?
yea so you need to be using new syntax xD and file naming/routing
watch that playlist I linked you
or goto https://learn.svelte.dev/tutorial/introducing-sveltekit
It has typescript FML
I will try searching more
You don't have to use TS
just ignore the TS bits ez 👏