rsnext/errors/non-dynamic-getstaticpaths-usage.md
JJ Kasper 6e7245cddb
Add error for getStaticPaths on non-dynamic page (#24188)
Noticed in this issue the reproduction was using `getStaticPaths` on a non-dynamic page incorrectly although we don't currently show an error for this. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

x-ref: https://github.com/vercel/next.js/issues/22931
2021-04-18 09:31:40 +00:00

531 B

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.