{"record":{"id":"766d5f2441fb9f17","repo":"withastro/astro","slug":"adaptersupportoutputmismatch","errorCode":"AdapterSupportOutputMismatch","errorMessage":"The `${adapterName}` adapter is configured to output a static website, but the project contains server-rendered pages. Please install and configure the appropriate server adapter for your final deployment.","messagePattern":"The `(.+?)` adapter is configured to output a static website, but the project contains server-rendered pages\\. Please install and configure the appropriate server adapter for your final deployment\\.","errorType":"exception","errorClass":"AstroError","httpStatus":null,"severity":"error","filePath":"packages/astro/src/core/dev/adapter-validation.ts","lineNumber":38,"sourceCode":"export function validateSetAdapter(\n\tlogger: AstroLogger,\n\tsettings: AstroSettings,\n\tadapter: AstroAdapter,\n\tmaybeConflictingIntegration: string,\n\tcommand?: 'dev' | 'build' | string,\n) {\n\tif (settings.adapter && settings.adapter.name !== adapter.name) {\n\t\tthrow new Error(\n\t\t\t`Integration \"${maybeConflictingIntegration}\" conflicts with \"${settings.adapter.name}\". You can only configure one deployment integration.`,\n\t\t);\n\t}\n\n\tif (settings.buildOutput === 'server' && adapter.adapterFeatures?.buildOutput === 'static') {\n\t\t// If the adapter is not compatible with the build output, throw an error\n\t\tif (command === 'build') {\n\t\t\tconst adapterRecommendation = getAdapterStaticRecommendation(adapter.name);\n\n\t\t\tthrow new AstroError({\n\t\t\t\t...AstroErrorData.AdapterSupportOutputMismatch,\n\t\t\t\tmessage: AstroErrorData.AdapterSupportOutputMismatch.message(adapter.name),\n\t\t\t\thint: adapterRecommendation ? adapterRecommendation : undefined,\n\t\t\t});\n\t\t} else if (command === 'dev') {\n\t\t\tlogger.warn(\n\t\t\t\tnull,\n\t\t\t\t`The adapter ${adapter.name} does not support emitting a server output, but the project contain server-rendered pages. Your project will not build correctly.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tif (adapter.entrypointResolution === undefined) {\n\t\tlogger.warn(\n\t\t\tnull,\n\t\t\t`The adapter ${adapter.name} uses \\`entrypointResolution: \"explicit\"\\` by default, which is deprecated and will be removed in a future major version.`,\n\t\t);\n\t\tlogger.warn(","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/withastro/astro/blob/d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca/packages/astro/src/core/dev/adapter-validation.ts#L20-L56","documentation":"`AdapterSupportOutputMismatch` is thrown at build time when the project's detected build output is `server` (it contains server-rendered pages) but the configured adapter declares `adapterFeatures.buildOutput === 'static'`. The adapter cannot emit server output, so the build would be broken; Astro fails fast with a hint pointing to a recommended server adapter. In dev the same condition only warns.","triggerScenarios":"Using a static-only adapter (e.g., a static-host adapter) while a page has `export const prerender = false` or `output: 'server'`, then running `astro build`. The branch at `adapter-validation.ts:38` throws during `command === 'build'`.","commonSituations":"Switching a project from static to hybrid/server output without changing the adapter; installing a static adapter by mistake; an adapter that hasn't opted into server output features.","solutions":["Install and configure a server-capable adapter (e.g., `@astrojs/node`, `@astrojs/vercel/serverless`) — the hint suggests a recommendation.","If you intend static output, remove server-rendered pages and set `output: 'static'`.","Confirm the adapter's `adapterFeatures.buildOutput` is `'server'` or `'hybrid'` for server projects."],"exampleFix":"// before\nimport staticAdapter from '@astrojs/static-host';\nexport default defineConfig({ adapter: staticAdapter(), output: 'server' });\n\n// after\nimport node from '@astrojs/node';\nexport default defineConfig({ adapter: node({ mode: 'standalone' }), output: 'server' });","handlingStrategy":"validation","validationCode":"const serverOutput = settings.buildOutput === 'server';\nconst staticAdapter = adapter.adapterFeatures?.buildOutput === 'static';\nif (serverOutput && staticAdapter) throw new Error('Adapter cannot emit server output');","typeGuard":"function adapterSupportsServer(adapter) { return adapter?.adapterFeatures?.buildOutput !== 'static'; }","tryCatchPattern":null,"preventionTips":["Match adapter capabilities to the project's output mode.","When moving to server/hybrid output, swap to a server-capable adapter.","Review the adapter's documented buildOutput feature in CI."],"tags":["adapter","configuration","deployment","build-output"],"backgroundTag":null,"analyzedSha":"d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca","analyzedAt":"2026-08-12T13:37:29.035Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}