KUBB_PLUGIN_NOT_FOUND: Plugin not found
Code: KUBB_PLUGIN_NOT_FOUND
Level: error
A plugin requires another plugin that is not in the config.
What happened
Some plugins build on others. The query and client generators, for example, need @kubb/plugin-ts for the types they emit. When a plugin declares a dependency that is not registered, Kubb cannot run it. OpenAPI parsing is no longer a plugin dependency in v5. The adapter reads the document, so you never list @kubb/plugin-oas.
How to fix it
- Add the required plugin to the
pluginsarray, and install it if needed. - Order does not matter. Kubb sorts plugins so dependencies run first. Just make sure the plugin is present.
- Remove the plugin that depends on it if you do not need it.
Common causes
- The required plugin is installed but not added to the
pluginsarray. - The required plugin is missing from
package.jsonentirely.
Example
typescript
import { } from 'kubb'
import { } from '@kubb/plugin-react-query'
// @kubb/plugin-ts is missing, but pluginReactQuery needs it for the generated types
export default ({
: { : './petstore.yaml' },
: { : './src/gen' },
: [()],
})Example output
text
[KUBB_PLUGIN_NOT_FOUND]: Plugin "@kubb/plugin-ts" is required but not found. Make sure it is included in your Kubb config.
fix: Add "@kubb/plugin-ts" to the plugins array in kubb.config.ts, or remove the dependency on it.
see: https://kubb.dev/docs/5.x/reference/diagnostics/kubb-plugin-not-found