rsnext/errors/non-dynamic-getstaticpaths-usage.mdx
Delba de Oliveira 44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00

16 lines
571 B
Text

---
title: '`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](/docs/pages/building-your-application/routing/dynamic-routes)
- [`getStaticPaths` Documentation](/docs/pages/building-your-application/routing/dynamic-routes)