Open ericnishio opened 1 year ago
The problem is reproducible at https://nextjs.org/blog/foobar as well.
I've been noticing the same issue in my website : https://gh.fredkiss.dev/Fredkiss3/gh-next/issues/58248y
We're also experiencing this issue with 14.2.8
- been trying to think of some workarounds, tried using a server action instead of NotFound(); but still leaves a blank page when js is disabled!
Only other workaround is using a <NotFound />
component
// src/app/[dynamicsegment]/(group)/page.tsx
if (response?.status?.code !== 200) {
notFound();
}
Link to the code that reproduces this issue
https://github.com/ericnishio/not-found-js-disabled-dynamic-route
To Reproduce
npm run dev
or run a production build withnpm run build && npm start
.Current vs. Expected behavior
Current behavior: Displays a blank page.
Expected behavior: Renders the text "Not Found".
When
notFound()
is called from a dynamic route with JavaScript disabled, thenot-found.tsx
page turns out blank. If you have JavaScript enabled, it works correctly.Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
No response