-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
- P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)An edge case that only affects very specific usage, but has a trivial workaround (priority)feat: error pagesRelated to 404 and 500 handling (scope)Related to 404 and 500 handling (scope)pkg: nodeRelated to Node adapter (scope)Related to Node adapter (scope)
Description
What version of astro are you using?
2.10.7
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Safari
Describe the Bug
In SSR mode, when going to a page that doesn't exist, the 404 page should be rendered (the default or custom one). It does this correctly in dev mode, but in production mode it only renders a blank page.
Using @astrojs/node 5.3.3 with node v18.16.1
Also see the repro.
Run npm run build && npm run preview and go to /doesntexist.
What's the expected result?
The 404 page should be rendered correctly in SSR production mode.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-trfvka?file=src%2Fpages%2Findex.astro
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)An edge case that only affects very specific usage, but has a trivial workaround (priority)feat: error pagesRelated to 404 and 500 handling (scope)Related to 404 and 500 handling (scope)pkg: nodeRelated to Node adapter (scope)Related to Node adapter (scope)