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

404 pages not working as intented when deployed #14

Closed
kwchang0831 opened this issue Apr 30, 2022 · 4 comments
Closed

404 pages not working as intented when deployed #14

kwchang0831 opened this issue Apr 30, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@kwchang0831
Copy link
Contributor

kwchang0831 commented Apr 30, 2022

Expected Behavior

In local dev, 404 pages are working as intented.
For non-existent path, it will generate dynamic 404 pages like the following image.
image

Current Behavior

However, when depolyed on both vercel and netlify, it will show function crash message.
On Vercel, it will always show function crash message.
On Netlify, for the same path it will show the crash message the first time. Next time, it will show the correct 404 page.

To Reproduce on Vercel

Go to the following URL, it will show function crash message
https://kwaa.dev/404

Result:
image

Go to the instance on Vercel > View Build Logs > Functions > Realtime Logs
You will get similar erorr like the following image.
image

To Reporduce on Netlify

Go to the following URL, the 1st time it will show function crash message
https://urara-demo.netlify.app/404

Result:
image

Go to the following URL, the 2nd time it will show the correct 404 page
https://urara-demo.netlify.app/404

Result:
image

@kwaa kwaa added bug Something isn't working help wanted Extra attention is needed labels Apr 30, 2022
@kwaa
Copy link
Member

kwaa commented Apr 30, 2022

This seems to have started after one of the updates and I'm not sure how to fix it at the moment;
I'll try to fix it later.

@kwaa
Copy link
Member

kwaa commented Apr 30, 2022

Update: what is certain at the moment is that it will report an error even if there is only plain text.

@kwaa
Copy link
Member

kwaa commented Apr 30, 2022

Update: It works fine after removing the html-minifier import. possible dependency issue

@kwaa
Copy link
Member

kwaa commented Apr 30, 2022

I think this issue is the same as sveltejs/kit#4247.
as a workaround, I'm considering to stop using html-minifier and wait for a better solution.

@kwaa kwaa removed the help wanted Extra attention is needed label Apr 30, 2022
@kwaa kwaa self-assigned this Apr 30, 2022
@kwaa kwaa closed this as completed in 0742e65 Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants