withastro/astro · error · Error
The adapter doesn't provide a feature map. It is required…
Error message
The adapter ${adapter.name} doesn't provide a feature map. It is required in Astro 4.0. What it means
During `astro:config:done`, an adapter registers itself with `setAdapter(adapter)`. Since Astro 4.0 every adapter must ship a `supportedAstroFeatures` feature map (which features - static output, server endpoints, sessions, etc. - it supports) so Astro can validate config against adapter capabilities. setAdapter throws this plain Error when the feature map is absent - the adapter was written for Astro 3.x or earlier.
Solutions
- Upgrade the adapter to a release that supports your Astro major (check its changelog for Astro 4/5 support).
- If no compatible release exists, switch to a maintained adapter or pin astro to the 3.x line the adapter supports.
- If you maintain the adapter, add a supportedAstroFeatures map to the adapter object passed to setAdapter.
Example fix
// before - adapter object without a feature map
setAdapter({ name: 'my-adapter', serverEntrypoint: 'my-adapter/entrypoint.js', config: {} });
// after
setAdapter({
name: 'my-adapter',
serverEntrypoint: 'my-adapter/entrypoint.js',
supportedAstroFeatures: { staticOutput: 'unsupported', serverOutput: 'supported', assets: { supportKind: 'stable' } },
config: {},
}); Defensive patterns
Strategy: validation
Validate before calling
// if you drive astro programmatically or wrap setAdapter
if (!adapter.supportedAstroFeatures || Object.keys(adapter.supportedAstroFeatures).length === 0) {
throw new Error(
'adapter ' + adapter.name + ' predates Astro 4.0 and lacks supportedAstroFeatures; upgrade it',
);
}
setAdapter(adapter); Type guard
function isAstro4Adapter(a: { name: string; supportedAstroFeatures?: unknown }): boolean {
return !!a.supportedAstroFeatures && typeof a.supportedAstroFeatures === 'object';
} Prevention
- Upgrade the adapter in lockstep with astro majors; check its changelog for supported major versions.
- Add a CI step asserting the adapter version supports the installed astro version (peerDependencies check).
- If you maintain an adapter, always ship supportedAstroFeatures and keep it accurate.
When it happens
Trigger: Using an adapter built against the pre-4.0 adapter API with Astro 4/5; a hand-rolled or community adapter whose setAdapter call omits supportedAstroFeatures; pinning an old adapter version after upgrading the astro package.
Common situations: Upgrading astro but leaving `@third-party/adapter` at an old version; internal/private adapters never updated for the 4.0 contract; adapter major that lags the framework major.
Related errors
- doesn't appear to be an integration or an adapter. Find our…
- App entrypoint must default export an object.
- Apps must be an object with an id, a name and an entrypoint.
- Apps must default export an object with an id, and a name.
- Integration has an unnamed renderer.
AI-assisted analysis of withastro/astro@52e6c34790 (2026-08-18).
Data as JSON: /api/errors/32aa95cdd4a53215.
Report an issue: GitHub.
Appendix: 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 52e6c34790)