Files
vercel__next.js/errors/get-initial-props-export.mdx
Jam Balaya 74a19b7467 docs: unify the header deps by removing # (#72391)
## 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>
2024-11-07 08:58:43 +00:00

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)