Skip to content

← All questions

sdods analyze invented 18 page routes out of directories that happen to be called pages

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

We are App Router only. No pages/ directory anywhere near the router. But:

bash
sdods analyze ../platform --report-only

comes back with a routes table full of things that do not exist:

text
kind   method  path                        source              file
page   -       /{id}                       next-pages-router   app/api/intranet/pages/[id]/route.ts
page   -       /{id}/publish/route.test     next-pages-router   app/api/intranet/pages/[id]/publish/route.test.ts
page   -       /{id}/archive               next-pages-router   app/api/intranet/pages/[id]/archive/route.ts

Eighteen of them. The same paths also appear correctly as api rows from the App Router detector, so I get both the right row and the wrong one. Is my repo laid out badly or is this the tool?

2 answers

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related