{"record":{"id":"6493868aeedfc80a","repo":"withastro/astro","slug":"integration-maybeconflictingintegration-confl","errorCode":null,"errorMessage":"Integration \"${maybeConflictingIntegration}\" conflicts with \"${settings.adapter.name}\". You can only configure one deployment integration.","messagePattern":"Integration \"(.+?)\" conflicts with \"(.+?)\"\\. You can only configure one deployment integration\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/astro/src/core/dev/adapter-validation.ts","lineNumber":28,"sourceCode":"\tif (hasWarnedMissingAdapter) return;\n\tif (settings.buildOutput === 'server' && !settings.config.adapter) {\n\t\tlogger.warn(\n\t\t\t'config',\n\t\t\t'This project contains server-rendered routes, but no adapter is installed. This is fine for development, but an adapter will be required to build your site for production.',\n\t\t);\n\t\thasWarnedMissingAdapter = true;\n\t}\n}\n\nexport 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.`,","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/core/dev/adapter-validation.ts#L10-L46","documentation":"`validateSetAdapter` runs when an integration registers an adapter via its `astro:config:setup` hook. If `settings.adapter` already holds an adapter with a different name, Astro throws this plain Error: only one deployment integration may be configured. The name in quotes is the previously registered adapter.","triggerScenarios":"Two adapter integrations in `integrations: [node(), vercel()]`; running `astro add netlify` when the config already contains `@astrojs/node` or another adapter; a non-adapter integration that also calls `setAdapter`.","commonSituations":"Switching deploy targets (e.g. Vercel to Netlify) by adding the new adapter without removing the old one; copy-pasting an example config that already had an adapter; forgetting an adapter added by a team member.","solutions":["Remove one of the conflicting adapters from the `integrations` array, keeping only the deployment target you actually use.","Uninstall the unused adapter package (`npm uninstall @astrojs/node`).","Clean up config keys belonging to the removed adapter (site-specific options, env vars).","If you meant to switch, prefer editing the config manually rather than stacking `astro add` runs."],"exampleFix":"// before\nimport node from '@astrojs/node';\nimport vercel from '@astrojs/vercel';\nexport default defineConfig({\n  integrations: [node(), vercel()], // two deployment adapters\n});\n\n// after\nimport vercel from '@astrojs/vercel';\nexport default defineConfig({\n  integrations: [vercel()],\n});","handlingStrategy":"validation","validationCode":"// Fail fast at config authoring time: only one deployment integration\nimport vercel from '@astrojs/vercel';\nconst integrations = [vercel()];\n// adding node() here as well would throw at runtime — keep exactly one adapter\nexport default defineConfig({ integrations });","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep exactly one deployment adapter in `integrations` per project.","Remove the old adapter entry (and uninstall its package) before or right after `astro add <new>`.","Review the integrations array after copying example configs or onboarding teammates."],"tags":["adapter","integrations","configuration"],"backgroundTag":"conflicting-configuration","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"}