withastro/astro · error · Error
Integration "${maybeConflictingIntegration}" conflicts with
Error message
Integration "${maybeConflictingIntegration}" conflicts with "${settings.adapter.name}". You can only configure one deployment integration. What it means
`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.
Source
Thrown at packages/astro/src/core/dev/adapter-validation.ts:28
if (hasWarnedMissingAdapter) return;
if (settings.buildOutput === 'server' && !settings.config.adapter) {
logger.warn(
'config',
'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.',
);
hasWarnedMissingAdapter = true;
}
}
export function validateSetAdapter(
logger: AstroLogger,
settings: AstroSettings,
adapter: AstroAdapter,
maybeConflictingIntegration: string,
command?: 'dev' | 'build' | string,
) {
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.`,View on GitHub (pinned to d081033d5f)
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.
Example fix
// before — astro.config.mjs
import node from '@astrojs/node';
import vercel from '@astrojs/vercel/serverless';
export default defineConfig({
adapter: node({ mode: 'standalone' }),
integrations: [vercel()],
});
// after
import vercel from '@astrojs/vercel/serverless';
export default defineConfig({
adapter: vercel(),
}); Defensive patterns
Strategy: validation
Validate before calling
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'); Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- AdapterSupportOutputMismatch
- CacheQueryConfigConflict
- ClientAddressNotAvailable
- Action not found: ${path}
- CannotOptimizeSvg
AI-assisted analysis of withastro/astro@d081033d5f (2026-08-12).
Data as JSON: /api/errors/6493868aeedfc80a.
Report an issue: GitHub.