Relative Content

Tag Archive for sveltekit

SvelteKit route gives 500 error on reload

I’ve been working on a SvelteKit project for some time now. Always there has been this issue where if I reload a route other than the home page I get a 500 error. I’m new to web development.

Not able to get a value in the alert inside a component -sveltekit

I am working on a webapp in sveltekit and I am not able to get the value in alert (for debugging).
I have a component ModalFlight.svelte. I am not able to get the value of token retrieved in page.sever.ts in it.
The value retrieved is a token from a third party api which i want to be available to other components as well.
I don’t want to use cookies here because I want to increase my understanding as to where I am going wrong
ModalFlight.svelte

In which case route.id in sveltekit could be null?

VSCode and the typescript definition of the SvelteKit RequestEvent tells me, that route.id could be propably null. I am confuesed of that, because how should it be possible to trigger the hook without calling a route and getting a id for it?