withastro/astro · warning

The adapter ${adapter.name} does not support emitting a serv

Error message

The adapter ${adapter.name} does not support emitting a server output, but the project contain server-rendered pages. Your project will not build correctly.

What it means

The configured adapter declares adapterFeatures.buildOutput === 'static' — it can only produce static output — while the project contains server-rendered routes. In `astro dev` this logs the warning; the identical condition during `astro build` throws the AdapterSupportOutputMismatch error instead.

Source

Thrown at packages/astro/src/core/dev/adapter-validation.ts:44

) {
	if (settings.adapter && settings.adapter.name !== adapter.name) {
		throw new Error(
			`Integration "${maybeConflictingIntegration}" conflicts with "${settings.adapter.name}". You can only configure one deployment integration.`,
		);
	}

	if (settings.buildOutput === 'server' && adapter.adapterFeatures?.buildOutput === 'static') {
		// If the adapter is not compatible with the build output, throw an error
		if (command === 'build') {
			const adapterRecommendation = getAdapterStaticRecommendation(adapter.name);

			throw new AstroError({
				...AstroErrorData.AdapterSupportOutputMismatch,
				message: AstroErrorData.AdapterSupportOutputMismatch.message(adapter.name),
				hint: adapterRecommendation ? adapterRecommendation : undefined,
			});
		} else if (command === 'dev') {
			logger.warn(
				null,
				`The adapter ${adapter.name} does not support emitting a server output, but the project contain server-rendered pages. Your project will not build correctly.`,
			);
		}
	}

	if (adapter.entrypointResolution === undefined) {
		logger.warn(
			null,
			`The adapter ${adapter.name} uses \`entrypointResolution: "explicit"\` by default, which is deprecated and will be removed in a future major version.`,
		);
		logger.warn(
			null,
			'Update your adapter to use \`entrypointResolution: "auto"\` or contact the maintainers to update.',
		);
	}
}

View on GitHub (pinned to 52e6c34790)

Solutions

  1. Switch to an SSR-capable adapter (e.g. @astrojs/node) that supports server output
  2. Or make the project static: prerender all pages and use output: 'static'
  3. Or remove the server-rendered routes that force server output

Example fix

// before — static-only adapter with server routes
import staticAdapter from 'some-static-adapter';
export default defineConfig({ output: 'server', adapter: staticAdapter() });

// after — SSR-capable adapter
import node from '@astrojs/node';
export default defineConfig({
  output: 'server',
  adapter: node({ mode: 'standalone' }),
});
Defensive patterns

Strategy: validation

Validate before calling

// invariant: adapter capability must match build output
const adapter = config.adapter;
if (adapter?.adapterFeatures?.buildOutput === 'static' && config.output === 'server') {
  throw new Error(`${adapter.name} cannot emit server output`);
}

Prevention

When it happens

Trigger: A static-only adapter combined with settings.buildOutput === 'server' (output: 'server' or prerender = false pages), while running the dev server.

Common situations: Using a static/host-specific adapter and later adding API routes or SSR pages; upgrading an adapter whose declared features changed.

Related errors


AI-assisted analysis of withastro/astro@52e6c34790 (2026-08-18). Data as JSON: /api/errors/32097183d72c4648. Report an issue: GitHub.