mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
74a19b7467
## Summary Remove redundant `#` from [error pages](https://github.com/vercel/next.js/tree/canary/errors). ## Description Follow up #52038 and #72263. Updated [template.txt](https://github.com/vercel/next.js/blob/canary/errors/template.txt) and clarified the header deps. Then rewrite as per the template. ### Improving Documentation - [x] Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - [x] Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
18 lines
506 B
Plaintext
18 lines
506 B
Plaintext
---
|
|
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)
|