{"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/d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca/packages/astro/src/core/dev/adapter-validation.ts#L10-L46","documentation":"`validateSetAdapter` enforces that only one deployment adapter may be registered. If `settings.adapter` is already set and a new integration tries to set a differently-named adapter, Astro throws a plain `Error` naming both. This prevents two deployment integrations (e.g., Node + Vercel) from fighting over output configuration.","triggerScenarios":"Adding two deployment integrations to `astro.config` (e.g., `@astrojs/node` and `@astrojs/vercel`) so that the second integration's `updateConfig({ adapter })` triggers `validateSetAdapter` with a name differing from the first.","commonSituations":"Switching adapters and forgetting to remove the old integration; a starter template that bundled an adapter being combined with a user-added one; monorepo shared config accidentally merging two adapter integrations.","solutions":["Keep only one deployment integration in `astro.config.integrations`.","If switching adapters, fully remove the previous adapter integration and its import.","For multi-target builds, use separate config files / env-driven single adapter selection rather than registering both."],"exampleFix":"// before — astro.config.mjs\nimport node from '@astrojs/node';\nimport vercel from '@astrojs/vercel/serverless';\nexport default defineConfig({\n  adapter: node({ mode: 'standalone' }),\n  integrations: [vercel()],\n});\n\n// after\nimport vercel from '@astrojs/vercel/serverless';\nexport default defineConfig({\n  adapter: vercel(),\n});","handlingStrategy":"validation","validationCode":"const adapters = integrations.filter(i => i && i.name && /adapter|node|vercel|netlify|cloudflare/.test(i.name)); if (adapters.length > 1) throw new Error('Multiple adapters detected');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register exactly one deployment integration.","Remove the old adapter integration entirely when switching.","Use a single source of truth for adapter selection driven by env."],"tags":["adapter","configuration","deployment","config-conflict"],"backgroundTag":null,"analyzedSha":"d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca","analyzedAt":"2026-08-12T13:37:29.035Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}