svelte,sveltekit,vercel,vite
Why does it return a 500 error?
August 19, 2022, by Ocat
I don't know when it started, but when I launch sveltekit and make a screen transition, it returns a 500 error.
I was having trouble solving the problem by switching the favicon extension to .png or .ico.
Also rewrote the svelte-specific %svelte.assets%
to the path where the favicon is actually located, but this did not solve the problem.
However, this was easier than expected to fix with the following modification.
[Stackoverflow]Why is sveltekit fetching for favicon.png in subpath?
In the comments below the question of this one, I found the following answer.
href="%svelte.assets%/favicon.png"- I added a slash to this line and the error went away - href="/%svelte.assets%/favicon.png"
Apparently, all you need to do is prefix %svelte.assets%
with /
. Like this /%svelte.assets%/favicon.ico
.