44d1a1cb15
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
17 lines
508 B
Text
17 lines
508 B
Text
---
|
|
title: '`getInitialProps` Export Warning'
|
|
---
|
|
|
|
#### Why This Warning Occurred
|
|
|
|
You attempted to statically export your application via `output: 'export'` or `next export`, however, one or more of your pages uses `getInitialProps`.
|
|
|
|
Next.js discourages you to use `getInitialProps` in this scenario.
|
|
|
|
## Possible Ways to Fix It
|
|
|
|
Use `getStaticProps` instead for proper SSG support.
|
|
|
|
## Useful Links
|
|
|
|
- [`getStaticProps` Documentation](/docs/pages/building-your-application/data-fetching/get-static-props)
|