GUIDES · BUILD CONFIGURATION

Astro on Vercel: Cannot use server-rendered pages without an adapter

astro build stops with NoAdapterInstalled when a page renders on demand and no adapter is set. When an Astro site needs an adapter on Vercel, how to add @astrojs/vercel, and when a static site needs none.

The error

The build stops with NoAdapterInstalled: Cannot use server-rendered pages without an adapter. Please install and configure the appropriate server adapter for your final deployment. Astro's docs put the rule plainly: to render any page on demand, you need to add an adapter.

When an Astro site renders on demand

By default, your entire Astro site is prerendered at build time, and a static Astro site deploys to Vercel with zero configuration. Two settings change that. output: server in astro.config renders every page on demand by default. export const prerender = false in a page or an endpoint renders that one route on demand. Either one needs an adapter.

// astro.config.mjs
import { defineConfig } from "astro/config";

export default defineConfig({
  output: "server",
  // no adapter: astro build stops with NoAdapterInstalled
});

The fix: add Astro's Vercel adapter

Run npx astro add vercel. It installs @astrojs/vercel and adds the adapter to astro.config. To do it by hand, install @astrojs/vercel and set adapter: vercel() yourself.

// astro.config.mjs
import { defineConfig } from "astro/config";
import vercel from "@astrojs/vercel";

export default defineConfig({
  output: "server",
  adapter: vercel(),
});

Another platform's adapter on Vercel

A project that started on another host can still have @astrojs/node, @astrojs/netlify or @astrojs/cloudflare in astro.config. The build then passes, but the output is shaped for that platform. Vercel's docs for Astro say that to deploy a server-rendered Astro app, you must add Astro's Vercel adapter. Replace the old adapter with @astrojs/vercel and remove it from package.json.

A static site needs no adapter

If nothing renders on demand, you do not need an adapter to deploy to Vercel. Astro's Vercel adapter docs say you only need it for a static site if you use additional Vercel services, such as Web Analytics or Image Optimization through the adapter. Removing output: server and every prerender = false is also a valid fix.

How DeployDoctor catches it

DeployDoctor reads astro.config and the JavaScript and TypeScript files under src/pages in the Build configuration check. When output is server, or hybrid on Astro 4, or a route sets prerender to false, and astro.config has no adapter, it reports a failing check that points at the line. When the adapter is @astrojs/node, @astrojs/netlify or @astrojs/cloudflare, it reports a warning with the switch to @astrojs/vercel. The same check covers SvelteKit adapters built for another platform. Scan your repository for free on the home page, or run it on every pull request with the GitHub Action.

Updated 2026-10-17