Closed ScriptedAdventure closed 2 years ago
See https://github.com/sveltejs/kit/issues/5843 and https://github.com/vitejs/vite/pull/9737 This is likely a vite build issue/bug you are experiencing and not this adapter.
@philippschladitz This is a bug in svelte/vite, +
is considered a reserved character in a URL.
Hi @yarbsemaj how do I resolve this issue? We migrated to the new Sveltekit routing system and nothing is working and it's Friday. Please if someone could help me out.
Hi @souravjamwal77 Unfortunately, for a proper fix, You need to wait for the next vite release where this bug has been addressed. Alternatively, this commenter has written a vite plugin that will fix the issue in the meantime https://github.com/sveltejs/kit/issues/5843#issuecomment-1220222362
Hi @yarbsemaj I'm getting below errors after the successful deployment. What am I doing wrong?
{
"errorType": "TypeError",
"errorMessage": "Cannot read properties of null (reading 'handleError')",
"stack": [
"TypeError: Cannot read properties of null (reading 'handleError')",
" at Object.handle_error (/var/task/build/server/serverless.js:17138:28)",
" at respond (/var/task/build/server/serverless.js:17094:13)"
]
}
Hi @souravjamwal77 This looks to be an issue related to a svelte change introduced 3 days ago, I have published a new adapter (v0.12.0) that fixes this issue.
It should now be possible to deploy and use the latest sveltekit version.
Sveltekit changed to using +page and +layout files. As I just converted my application to the latest version, I found that +page css files and +layout css files are not loaded correctly as s3 doesn't support "+" in the uri.
Instead, the plus sign is converted to a "%2b".
One simple fix would be to change the uri in the router.js:
request.uri = uri.replace("+", "%2b")