Next.js Discord

Discord Forum

Custom not-found.tsx not rendering

Unanswered
Chalcid wasp posted this in #help-forum
Open in Discord
Chalcid waspOP
Structure:
app/(management)/guidebooks/[guidebookId]/
  ├─ layout.tsx    - Calls notFound() when guidebook not found
  ├─ not-found.tsx - Custom 404 page
  └─ cover/page.tsx

Issue: Custom not-found.tsx isn't rendering when guidebook isn't found. Shows default Next.js 404 instead.

Any ideas what might be wrong?

7 Replies

Chalcid waspOP
Inside the cover folder you say? if so, already tried that, its stills show to default 404
@Chalcid wasp Inside the `cover` folder you say? if so, already tried that, its stills show to default 404
nah one layer up from the component that calls it. Also: add a page.tsx to your guidebookid-page
@Chalcid wasp solved?
Chalcid waspOP
Hey, sorry forgot to answer but couldn't fix so i just gave up on that, i will come back to it later
@Chalcid wasp could you share if the reproduction works for you as well?