{"record":{"id":"32aa95cdd4a53215","repo":"withastro/astro","slug":"the-adapter-adapter-name-doesn-t-provide-a-feat","errorCode":null,"errorMessage":"The adapter ${adapter.name} doesn't provide a feature map. It is required in Astro 4.0.","messagePattern":"The adapter (.+?) doesn't provide a feature map\\. It is required in Astro 4\\.0\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/astro/src/integrations/hooks.ts","lineNumber":398,"sourceCode":"\tlogger: AstroLogger;\n\tcommand?: 'dev' | 'build' | 'preview' | 'sync';\n}) {\n\tfor (const integration of settings.config.integrations) {\n\t\tawait runHookInternal({\n\t\t\tintegration,\n\t\t\thookName: 'astro:config:done',\n\t\t\tlogger,\n\t\t\tparams: () => ({\n\t\t\t\tconfig: settings.config,\n\t\t\t\tsetAdapter(adapter) {\n\t\t\t\t\tvalidateSetAdapter(logger, settings, adapter, integration.name, command);\n\n\t\t\t\t\tif (adapter.adapterFeatures?.buildOutput !== 'static') {\n\t\t\t\t\t\tsettings.buildOutput = 'server';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!adapter.supportedAstroFeatures) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`The adapter ${adapter.name} doesn't provide a feature map. It is required in Astro 4.0.`,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalidateSupportedFeatures(\n\t\t\t\t\t\t\tadapter.name,\n\t\t\t\t\t\t\tadapter.supportedAstroFeatures,\n\t\t\t\t\t\t\tsettings,\n\t\t\t\t\t\t\tlogger,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tsettings.adapter = adapter;\n\t\t\t\t},\n\t\t\t\tinjectTypes(injectedType) {\n\t\t\t\t\tconst normalizedFilename = normalizeInjectedTypeFilename(\n\t\t\t\t\t\tinjectedType.filename,\n\t\t\t\t\t\tintegration.name,\n\t\t\t\t\t);\n","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/integrations/hooks.ts#L380-L416","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before - adapter object without a feature map\nsetAdapter({ name: 'my-adapter', serverEntrypoint: 'my-adapter/entrypoint.js', config: {} });\n\n// after\nsetAdapter({\n  name: 'my-adapter',\n  serverEntrypoint: 'my-adapter/entrypoint.js',\n  supportedAstroFeatures: { staticOutput: 'unsupported', serverOutput: 'supported', assets: { supportKind: 'stable' } },\n  config: {},\n});","handlingStrategy":"validation","validationCode":"// if you drive astro programmatically or wrap setAdapter\nif (!adapter.supportedAstroFeatures || Object.keys(adapter.supportedAstroFeatures).length === 0) {\n  throw new Error(\n    'adapter ' + adapter.name + ' predates Astro 4.0 and lacks supportedAstroFeatures; upgrade it',\n  );\n}\nsetAdapter(adapter);","typeGuard":"function isAstro4Adapter(a: { name: string; supportedAstroFeatures?: unknown }): boolean {\n  return !!a.supportedAstroFeatures && typeof a.supportedAstroFeatures === 'object';\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["adapters","integrations","version-migration"],"backgroundTag":"adapter-version-mismatch","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"}