NextJS Error: Catch-all must be the last part of the URL

This error can be caused by having any route subdirectories within a catch-all route. Do you have any directories within [...nextauth]?

For instance, someDirectory in the example below would cause this error:

app
├── [...nextauth]
│   └── route.ts
│   └── someDirectory
1 Like