Skip to content
Latchkey

Astro "Unable to render" (SSR adapter missing/mismatched) in CI

Astro server-side rendering needs an adapter that matches the deploy target. Without the right adapter (and output: "server" or "hybrid"), the build cannot produce a server entry, and rendering a dynamic route fails.

What this error means

The build or a rendered request fails with "Unable to render" or "Cannot use server-side rendering without an adapter", and dynamic routes do not work.

astro
[error] Cannot use `Astro.request` / server-side rendering without an adapter.
Install and configure the appropriate server adapter, then set output: 'server'.

Common causes

No SSR adapter for the deploy target

The app uses SSR features but no adapter (@astrojs/node, @astrojs/vercel, @astrojs/cloudflare) is installed and configured.

The adapter does not match the target

An adapter for the wrong platform produces a server entry the host cannot run, so rendering fails on deploy.

How to fix it

Install and configure the matching adapter

  1. Add the adapter for your host (astro add node, vercel, or cloudflare).
  2. Set output: "server" (or "hybrid") in the Astro config.
  3. Rebuild so a server entry is produced for the target.
astro.config.mjs
// astro.config.mjs
import node from "@astrojs/node";
export default { output: "server", adapter: node({ mode: "standalone" }) };

Use the adapter for the actual deploy platform

Match the adapter to where you deploy (Vercel, Cloudflare, or a Node server) so the server entry runs on the target.

How to prevent it

  • Install the adapter that matches your deploy target.
  • Set the correct output mode for SSR routes.
  • Test the production server build against the target runtime.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →