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.
[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
- Add the adapter for your host (
astro add node,vercel, orcloudflare). - Set
output: "server"(or"hybrid") in the Astro config. - Rebuild so a server entry is produced for the target.
// 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
outputmode for SSR routes. - Test the production server build against the target runtime.