Next.js will happily build in a mode Glacro cannot serve. The fix is one config flag, but the interesting part is what that flag turns off — and finding that out locally rather than after a deploy.
Turning on static export
// next.config.js
module.exports = {
output: "export",
images: { unoptimized: true },
};With output: "export", next build writes a directory of HTML, CSS and JS instead of a server bundle. Set the output directory to out in your project settings and the deploy will pick it up.
What stops working
Server Actions, route handlers under app/api, middleware, per-request server rendering, incremental static regeneration, and the built-in image optimizer all require a running server. In export mode Next.js will either fail the build or silently skip them. The image optimizer is the one that catches people out, which is why unoptimized is set above.
Data fetching still works
Fetching at build time is fine — generateStaticParams and fetch inside a server component both run during the build and bake the result into the output. What you lose is fetching per request. For anything that must be live, call an API from the browser at runtime.