Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+page and +layout will break the current adapter #18

Closed
ScriptedAdventure opened this issue Aug 17, 2022 · 6 comments
Closed

+page and +layout will break the current adapter #18

ScriptedAdventure opened this issue Aug 17, 2022 · 6 comments

Comments

@ScriptedAdventure
Copy link

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")

@nickmenow
Copy link

See sveltejs/kit#5843 and vitejs/vite#9737
This is likely a vite build issue/bug you are experiencing and not this adapter.

@yarbsemaj
Copy link
Owner

yarbsemaj commented Aug 24, 2022

@philippschladitz This is a bug in svelte/vite, + is considered a reserved character in a URL.

@souravjamwal77
Copy link

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.

@yarbsemaj
Copy link
Owner

yarbsemaj commented Aug 26, 2022

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 sveltejs/kit#5843 (comment)

@souravjamwal77
Copy link

souravjamwal77 commented Aug 27, 2022

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)"
    ]
}

@yarbsemaj
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants