-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error for getStaticPaths on non-dynamic page
- Loading branch information
Showing
3 changed files
with
65 additions
and
5 deletions.
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,14 @@ | ||
# getStaticPaths Used on Non-Dynamic Page | ||
|
||
#### Why This Error Occurred | ||
|
||
On a non-dynamic SSG page `getStaticPaths` was incorrectly exported as this can only be used on dynamic pages to return the paths to prerender. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Remove the `getStaticPaths` export on the non-dynamic page or rename the page to be a dynamic page. | ||
|
||
### Useful Links | ||
|
||
- [Dynamic Routes Documentation](https://nextjs.org/docs/routing/dynamic-routes) | ||
- [`getStaticPaths` Documentation](https://nextjs.org/docs/routing/dynamic-routes) |
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