forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add warning when reserved pages are nested (vercel#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: vercel#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>
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 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. | ||
|
||
### Useful Links | ||
|
||
- [Custom `_app` Documentation](https://nextjs.org/docs/advanced-features/custom-app) | ||
- [Custom `_error` Documentation](https://nextjs.org/docs/advanced-features/custom-error-page) | ||
- [Custom `_document` Documentation](https://nextjs.org/docs/advanced-features/custom-document) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters