rsnext/errors/nested-reserved-page.md
JJ Kasper e2619359ec
Add warning when reserved pages are nested (#13449)
This adds a warning when a user has nested a reserved page `_error`, `_app`, or `_document` in their pages directory since it causes it to not be picked up and used by Next.js in the expected way

x-ref: https://github.com/zeit/next.js/pull/13425

<details>
<summary>Example of warning</summary>

<img width="927" alt="Screen Shot 2020-05-27 at 10 39 09" src="https://user-images.githubusercontent.com/22380829/83042315-24276c00-a007-11ea-9dc4-cabcc93571d2.png">
</details>
2020-05-27 16:45:53 +00:00

668 B

Nested Reserved Page

Why This Error Occurred

In your pages folder you nested a reserved page e.g. _app, _error, or _document which causes the page to not be used since they must be located directly under the pages folder.

Possible Ways to Fix It

Move the reserved pages directly under your pages folder so that they are picked up and used correctly.