get-initial-props-export.mdx


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.

Rendered from the public repository vercel/next.js on GitHub; content belongs to its authors. Cached for up to an hour.

errors/get-initial-props-export.mdx · vercel/next.js | Docs MD