{"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/d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca/packages/astro/src/integrations/hooks.ts#L380-L416","documentation":"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.","triggerScenarios":"An adapter object passed to `setAdapter` has no `supportedAstroFeatures` property (e.g. `setAdapter({ name, serverEntrypoint })` with no feature map).","commonSituations":"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.","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."],"exampleFix":"// before\nexport default function myAdapter() {\n  return {\n    name: 'my-adapter',\n    serverEntrypoint: '@my/adapter/server.js',\n    hooks: { 'astro:config:done': ({ setAdapter }) => setAdapter({ name: 'my-adapter', serverEntrypoint: '@my/adapter/server.js' }) },\n  }\n}\n\n// after — declare the feature map (Astro 4.0+)\nsetAdapter({\n  name: 'my-adapter',\n  serverEntrypoint: '@my/adapter/server.js',\n  supportedAstroFeatures: new Set([\n    AstroAdapterFeature.AstroNodePlatformSupportPackageDeprecated,\n  ]),\n})","handlingStrategy":"validation","validationCode":"function assertAdapterHasFeatures(adapter) {\n  if (!adapter || !adapter.supportedAstroFeatures) {\n    throw new Error(`Adapter ${adapter?.name} must declare supportedAstroFeatures (Astro 4.0+)`);\n  }\n}","typeGuard":"function adapterDeclaresFeatures(adapter) {\n  return !!adapter && adapter.supportedAstroFeatures instanceof Set;\n}","tryCatchPattern":"null","preventionTips":["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."],"tags":["integrations","adapter","config","astro-4","ssr"],"backgroundTag":null,"analyzedSha":"d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca","analyzedAt":"2026-08-12T13:37:29.035Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}