Cant do static export. Lots of errors. What the hell.
Unanswered
Spectacled bear posted this in #help-forum
Spectacled bearOP
PS C:\Dashboard\Bmst\ultahost\React\boilerplate> npm run build
> boilerplate@0.1.0 build
> next build
âš Specified "headers" will not automatically work with "output: export". See more info here: https://nextjs.org/docs/messages/export-no-custom-routes
âš Specified "headers" will not automatically work with "output: export". See more info here: https://nextjs.org/docs/messages/export-no-custom-routes
â–² Next.js 14.1.0
Creating an optimized production build ...
âš Specified "headers" will not automatically work with "output: export". See more info here: https://nextjs.org/docs/messages/export-no-custom-routes
âš Specified "headers" will not automatically work with "output: export". See more info here: https://nextjs.org/docs/messages/export-no-custom-routes
Compiler edge-server unexpectedly exited with code: null and signal: SIGTERM
âš Specified "headers" will not automatically work with "output: export". See more info here: https://nextjs.org/docs/messages/export-no-custom-routes
✓ Compiled successfully
Skipping linting
✓ Checking validity of types
✓ Collecting page data
Generating static pages (0/8) [= ]u [Error]: 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
at c (C:\Dashboard\Bmst\ultahost\React\boilerplate\.next\server\chunks\356.js:1:81687)
.....
> Export encountered errors on following paths:
/(ui)/(frontend)/(home)/page: /
/(ui)/(frontend)/about/page: /about
/(ui)/(frontend)/contactus/page: /contactus
/(ui)/(frontend)/services/page: /services
PS C:\Dashboard\Bmst\ultahost\React\boilerplate>I cant attach full errors as its long
Anyone have any solution. Whole idea of me is create static html file out so its fast.
2 Replies
You are using dynamic features which is not supported in static exports for reason that your static export can't process dynamic requests because it has no server to begin with
you might want to export as "standalone" not "static"