withastro/astro · error · Error
The adapter ${adapter.name} doesn't provide a feature map. I
Error message
The adapter ${adapter.name} doesn't provide a feature map. It is required in Astro 4.0. What it means
When an adapter is set via `setAdapter` in `astro:config:done`, Astro requires `adapter.supportedAstroFeatures` to be present (introduced as mandatory in Astro 4.0). If the adapter object omits `supportedAstroFeatures`, Astro throws a plain Error so adapters explicitly declare the feature set they support.
Source
Thrown at packages/astro/src/integrations/hooks.ts:398
logger: AstroLogger;
command?: 'dev' | 'build' | 'preview' | 'sync';
}) {
for (const integration of settings.config.integrations) {
await runHookInternal({
integration,
hookName: 'astro:config:done',
logger,
params: () => ({
config: settings.config,
setAdapter(adapter) {
validateSetAdapter(logger, settings, adapter, integration.name, command);
if (adapter.adapterFeatures?.buildOutput !== 'static') {
settings.buildOutput = 'server';
}
if (!adapter.supportedAstroFeatures) {
throw new Error(
`The adapter ${adapter.name} doesn't provide a feature map. It is required in Astro 4.0.`,
);
} else {
validateSupportedFeatures(
adapter.name,
adapter.supportedAstroFeatures,
settings,
logger,
);
}
settings.adapter = adapter;
},
injectTypes(injectedType) {
const normalizedFilename = normalizeInjectedTypeFilename(
injectedType.filename,
integration.name,
);
View on GitHub (pinned to d081033d5f)
Solutions
- Upgrade the adapter package to a version compatible with Astro 4.0+ that declares `supportedAstroFeatures`.
- If authoring an adapter, add `supportedAstroFeatures: new Set([...])` listing supported `Serveronly`/feature flags (can be an empty set if none).
- Switch to a maintained adapter if the current one is abandoned.
Example fix
// before
export default function myAdapter() {
return {
name: 'my-adapter',
serverEntrypoint: '@my/adapter/server.js',
hooks: { 'astro:config:done': ({ setAdapter }) => setAdapter({ name: 'my-adapter', serverEntrypoint: '@my/adapter/server.js' }) },
}
}
// after — declare the feature map (Astro 4.0+)
setAdapter({
name: 'my-adapter',
serverEntrypoint: '@my/adapter/server.js',
supportedAstroFeatures: new Set([
AstroAdapterFeature.AstroNodePlatformSupportPackageDeprecated,
]),
}) Defensive patterns
Strategy: validation
Validate before calling
function assertAdapterHasFeatures(adapter) {
if (!adapter || !adapter.supportedAstroFeatures) {
throw new Error(`Adapter ${adapter?.name} must declare supportedAstroFeatures (Astro 4.0+)`);
}
} Type guard
function adapterDeclaresFeatures(adapter) {
return !!adapter && adapter.supportedAstroFeatures instanceof Set;
} Try / catch
null
Prevention
- Use an adapter version that targets Astro 4.0+.
- When authoring, always set supportedAstroFeatures (empty Set if nothing).
- Pin adapter versions known-compatible with your Astro version.
When it happens
Trigger: An adapter object passed to `setAdapter` has no `supportedAstroFeatures` property (e.g. `setAdapter({ name, serverEntrypoint })` with no feature map).
Common situations: Using an adapter built for Astro 3.x that predates the required feature map; authoring a custom adapter and omitting the field; an adapter that sets `supportedAstroFeatures: undefined` explicitly.
Related errors
- [preview] No adapter found.
- Renderer ${renderer.name} does not provide a serverEntrypoin
- Configured image service is not a local service
- MissingGetFontFileRequestUrl
- ClientAddressNotAvailable
AI-assisted analysis of withastro/astro@d081033d5f (2026-08-12).
Data as JSON: /api/errors/32aa95cdd4a53215.
Report an issue: GitHub.