{"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/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/core/dev/adapter-validation.ts#L20-L56","documentation":"`AdapterSupportOutputMismatch` is thrown when the resolved settings have `buildOutput: 'server'` (the project contains server-rendered pages / `output: 'server'`) but the adapter registering itself declares `adapterFeatures.buildOutput: 'static'`. At build time it throws with a hint recommending a server-capable adapter; at dev time the same condition only logs a warning.","triggerScenarios":"Using a static-only adapter (or static-only major version) together with `output: 'server'` in config, or with any page using `export const prerender = false`, and running `astro build`.","commonSituations":"Enabling SSR on a project deployed with a static-only adapter build; upgrading Astro but keeping an old adapter major that predates server output support; following an SSR tutorial without swapping the adapter.","solutions":["Install/upgrade to an adapter version that supports server output — the error's hint names the recommendation for your adapter.","Or stay static: set `output: 'static'` (default) and make sure all pages are prerendered, removing on-demand routes.","Re-run `astro build` after the change to confirm the mismatch is gone."],"exampleFix":"// before — static-only adapter with server output\nexport default defineConfig({\n  output: 'server',\n  integrations: [myStaticAdapter()],\n});\n\n// after — option A: use a server-capable adapter\nexport default defineConfig({ output: 'server', integrations: [myServerAdapter()] });\n// after — option B: stay static\nexport default defineConfig({ output: 'static', integrations: [myStaticAdapter()] });","handlingStrategy":"validation","validationCode":"// Config-time assertion: adapter capabilities must match the output mode\nimport node from '@astrojs/node';\nconst adapter = node({ mode: 'standalone' });\nconst output = 'server'; // your intended mode\nif (output === 'server' && adapter.adapterFeatures?.buildOutput === 'static') {\n  throw new Error('Configured adapter cannot emit server output; pick a server-capable adapter.');\n}\nexport default defineConfig({ output, adapter });","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the adapter's documentation for supported output modes before setting `output: 'server'`.","Run a full `astro build` in CI so mismatches fail the pipeline, not production.","Treat the dev-mode warning about server output seriously — it predicts the build failure."],"tags":["adapter","ssr","build-output","configuration"],"backgroundTag":"configuration-mismatch","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}