komal.nakrani
Browse Themes
ThemesCategoriesDocsBlogTips & Tricks
Server Rendering••By Komal Nakrani

Fix: Adapter Does Not Support Server Output in Astro

Astro's 'Adapter does not support server output' means your adapter only builds static sites while some pages render on demand. Switch adapter or prerender them.

#Astro#Errors#Adapters#SSR

Astro reports “Adapter does not support server output” when the adapter in your config can only produce a static site, but the project contains pages that render on demand. The full message names the adapter: it “is configured to output a static website, but the project contains server-rendered pages.” Either switch to an adapter that can run a server, or make those pages prerendered.

Key Takeaways

  • Some adapters and integrations only support static output.
  • Any prerender = false route, or output: 'server', conflicts with them.
  • Official adapters for Node, Cloudflare, Netlify and Vercel all support on-demand pages.
  • If you didn’t mean to have server pages, find and remove the opt-out.

Find the server-rendered routes

grep -rn "prerender = false" src/
grep -n "output" astro.config.mjs

Remember that endpoints (src/pages/**/*.ts) count, and so do pages using features that require a server, such as actions submitted from a form.

Fix 1: use an adapter that supports a server

Replace the static-only adapter with the official one for your host:

npx astro add netlify   # or node, cloudflare, vercel

Then remove the old adapter import from astro.config.mjs so only one adapter remains. Check your host’s docs if you were using a community adapter: some exist specifically to add static hosting features and were never meant to run code.

Fix 2: prerender everything

If the on-demand pages don’t need request data, remove the opt-out:

- export const prerender = false;

and, if you set it, remove output: 'server'. Dynamic routes then need getStaticPaths(); see getStaticPaths() required.

Which approach to choose

Situation Choose
Pages need cookies, auth or live data Fix 1
Only a form needs a server A third-party form endpoint, then Fix 2
Pages were marked on-demand by habit Fix 2
Host only serves static files (GitHub Pages, S3) Fix 2, or move hosts

GitHub Pages and plain object storage can’t run server code at all, so no adapter will help there. The Astro deploy guide compares hosts that can.

Related: Cannot use server-side rendering without an adapter is the version of this error with no adapter at all. The Astro SSR guide covers output modes, and the on-demand rendering docs list adapter features.

FAQ

Can I have two adapters in one Astro project?

No. Astro accepts a single adapter. Pick the one for your production host.

Why did this start after upgrading Astro?

Older releases had an output: 'hybrid' mode. Since Astro 5, use output: 'static' with prerender = false on individual pages, and make sure your adapter version supports the Astro version you upgraded to.