Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When output is export, the build fails #627

Closed
kjxbyz opened this issue Nov 15, 2023 · 1 comment
Closed

When output is export, the build fails #627

kjxbyz opened this issue Nov 15, 2023 · 1 comment
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@kjxbyz
Copy link

kjxbyz commented Nov 15, 2023

Description

StaticGenBailoutError: Page with `dynamic = "error"` couldn't be rendered statically because it used `headers`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering
--
00:51:10.529 | at staticGenerationBailout (/vercel/path0/app/.next/server/chunks/570.js:1:81342)
00:51:10.529 | at headers (/vercel/path0/app/.next/server/chunks/41.js:13:49131)
00:51:10.529 | at /vercel/path0/app/.next/server/chunks/41.js:13:44243
00:51:10.529 | at /vercel/path0/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:108:5119
00:51:10.529 | at s (/vercel/path0/app/.next/server/chunks/41.js:13:44967)
00:51:10.529 | at e (/vercel/path0/app/.next/server/chunks/41.js:13:45059)
00:51:10.529 | at m (/vercel/path0/app/.next/server/chunks/41.js:13:46804)
00:51:10.529 | at em (/vercel/path0/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:10452)
00:51:10.529 | at /vercel/path0/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:22148
00:51:10.530 | at Object.toJSON (/vercel/path0/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:25726) {
00:51:10.530 | code: 'NEXT_STATIC_GEN_BAILOUT'

Mandatory reproduction URL (CodeSandbox or GitHub repository)

cyf/faforever-tauri#72

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Click on …
  3. See error: …

Expected behaviour

When output is export, the build is normal

@kjxbyz kjxbyz added bug Something isn't working unconfirmed Needs triage. labels Nov 15, 2023
@amannn
Copy link
Owner

amannn commented Nov 15, 2023

Please see Usage without middleware (static export) in the docs, this should help. I'll move this to a discussion since it seems to be a usage question.

Repository owner locked and limited conversation to collaborators Nov 15, 2023
@amannn amannn converted this issue into discussion #628 Nov 15, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants