Are you an LLM? You can read better optimized documentation at /docs/5.x/reference/diagnostics/kubb-invalid-plugin-options.md for this page in Markdown format
KUBB_INVALID_PLUGIN_OPTIONS
Severity: error · Source: Configuration
A plugin was given options that cannot be honored together. The main case is output.mode: 'file'
paired with a group option: a single-file output has nothing to split into groups, so the build
stops instead of producing something the options do not describe.
sh
× plugin-client(KUBB_INVALID_PLUGIN_OPTIONS): Plugin "plugin-client" sets `output.mode: 'file'` but also configures a `group` option.
help: A single-file output has nothing to group. Remove the `group` option, or use `output.mode: 'directory'` to organize files into subdirectories.
docs: https://kubb.dev/docs/5.x/reference/diagnostics/kubb-invalid-plugin-optionsWhat it means
output.mode: 'file' writes everything into one file at output.path. The group option splits
output into per-tag or per-path subdirectories, which only applies to output.mode: 'directory'.
Combining the two contradicts itself, so Kubb reports the configuration as invalid at plugin setup
rather than guessing a layout. The TypeScript types catch the same mistake at compile time, but a
config written in JavaScript or cast to any only surfaces it here.
Common causes
- A plugin sets
output: { mode: 'file' }but also passes a siblinggroupoption.
How to fix
- Remove the
groupoption when you want a single file. - Or switch to
output.mode: 'directory'(the default, one file per operation or schema) and keepgroupto organize that output into subdirectories.
typescript
import { defineConfig } from 'kubb'
import { pluginClient } from '@kubb/plugin-client'
export default defineConfig({
input: { path: './petStore.yaml' },
output: { path: './src/gen' },
plugins: [
pluginClient({
output: { path: 'clients', mode: 'directory' },
group: { type: 'tag' },
}),
],
})