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/next@14.0.1_@babel+core@7.23.2_@opentelemetry+api@1.6.0_react-dom@18.2.0_react@18.2.0/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/next@14.0.1_@babel+core@7.23.2_@opentelemetry+api@1.6.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:10452)
00:51:10.529 | at /vercel/path0/node_modules/.pnpm/next@14.0.1_@babel+core@7.23.2_@opentelemetry+api@1.6.0_react-dom@18.2.0_react@18.2.0/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/next@14.0.1_@babel+core@7.23.2_@opentelemetry+api@1.6.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:25726) {
00:51:10.530 | code: 'NEXT_STATIC_GEN_BAILOUT'
Discussed in #628
Originally posted by kjxbyz November 15, 2023
Description
Mandatory reproduction URL (CodeSandbox or GitHub repository)
kjxbyz/tauri-starter#72
Reproduction description
Steps to reproduce:
Expected behaviour
When
outputisexport, the build is normal