---
url: /docs/5.x/reference/diagnostics/kubb-adapter-required.md
description: >-
  The KUBB_ADAPTER_REQUIRED diagnostic fires when an action needs an adapter but
  none is configured.
---

# KUBB\_ADAPTER\_REQUIRED: Adapter required

Code: `KUBB_ADAPTER_REQUIRED`
Level: error

An action needs an adapter but none is configured.

## What happened

The adapter turns your spec into the AST that plugins generate from, and must be set before any plugin runs. This diagnostic is defined in Kubb's diagnostic catalog, but no code path in the current source reports it: `defineConfig` (the standard entry point, used in the example below) always fills in a default adapter (`adapterOas()`) when `adapter` is omitted, so a config without an explicit `adapter` never triggers it today.

## How to fix it

Set `adapter` in `kubb.config.ts`.

```typescript twoslash [kubb.config.ts]
import { defineConfig } from 'kubb/config'
import { adapterOas } from '@kubb/adapter-oas'

export default defineConfig({
  input: './petStore.yaml',
  output: { path: './src/gen' },
  adapter: adapterOas(),
  plugins: [/* ... */],
})
```

## Example output

```text [Terminal]
[KUBB_ADAPTER_REQUIRED]: An adapter is required, but none is configured.
  fix: Set `adapter` in kubb.config.ts (for example `adapterOas()`).
  see: https://kubb.dev/docs/5.x/reference/diagnostics/kubb-adapter-required
```

## See also

* [Adapters](/docs/5.x/guide/concepts/adapters)
* [Configuration](/docs/5.x/reference/configuration)
* [Diagnostics reference](/docs/5.x/reference/diagnostics)
