[{"data":1,"prerenderedAt":1355},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics":3},{"id":4,"title":5,"body":6,"description":1337,"extension":1338,"frontmatter":1339,"heading":5,"meta":1345,"navigation":1347,"order":1342,"path":1348,"seo":1349,"sitemap":1350,"source":1351,"stem":1352,"__hash__":1353,"hasPopups":1354},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics.md","Diagnostics",{"type":7,"value":8,"toc":1290},"minimark",[9,13,58,69,114,119,122,126,129,134,141,164,168,171,186,190,193,196,200,214,224,228,231,238,242,259,262,266,277,280,284,299,309,313,323,330,334,340,351,355,361,366,370,375,378,382,385,399,403,417,423,427,454,469,473,480,486,490,502,519,523,526,532,536,549,558,562,584,596,600,603,617,621,631,647,651,658,686,690,693,702,706,713,716,720,725,734,738,741,759,763,766,770,788,801,805,811,817,821,828,831,835,838,842,848,851,855,858,865,869,875,880,884,887,890,894,904,1233,1252,1280],[10,11,12],"p",{},"When a build fails, Kubb prints a diagnostic with a stable code, the message, the location in your\ndocument, and a suggested fix. In a terminal, Kubb groups problems by plugin, with the code on the right and a link to its entry below:",[14,15,20],"pre",{"language":16,"filename":17,"code":18,"class":19},"text","Terminal"," plugin-ts\n\n  ✖ Could not find #\u002Fcomponents\u002Fschemas\u002FOwner                    KUBB_REF_NOT_FOUND\n    at   #\u002Fcomponents\u002Fschemas\u002FPet\u002Fproperties\u002Fowner\n    fix  Add the missing definition under components.schemas, or fix the $ref.\n    ↳ Learn more  kubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-ref-not-found","shiki shiki-themes github-light github-dark dark:github-dark",[21,22,24,32,33,32,38,32,43,32,48,32,53],"code",{"class":23},"language-text",[25,26,29],"span",{"class":27,"style":28},"line","display: inline",[25,30,31],{}," plugin-ts","\n",[25,34,35],{"class":27,"style":28},[25,36,37],{},"",[25,39,40],{"class":27,"style":28},[25,41,42],{},"  ✖ Could not find #\u002Fcomponents\u002Fschemas\u002FOwner                    KUBB_REF_NOT_FOUND",[25,44,45],{"class":27,"style":28},[25,46,47],{},"    at   #\u002Fcomponents\u002Fschemas\u002FPet\u002Fproperties\u002Fowner",[25,49,50],{"class":27,"style":28},[25,51,52],{},"    fix  Add the missing definition under components.schemas, or fix the $ref.",[25,54,55],{"class":27,"style":28},[25,56,57],{},"    ↳ Learn more  kubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-ref-not-found",[10,59,60,61,64,65,68],{},"When an AI coding agent, CI, or a pipe reads the output, Kubb prints plain labeled rows instead. The rows include the cause and fix from this page, so the output alone explains the problem. A crash adds ",[21,62,63],{},"caused by:"," and the first ",[21,66,67],{},"stack:"," frames:",[14,70,73],{"language":16,"filename":71,"code":72,"class":19},"Agent","error KUBB_REF_NOT_FOUND [plugin-ts]: Could not find #\u002Fcomponents\u002Fschemas\u002FOwner\n  at: #\u002Fcomponents\u002Fschemas\u002FPet\u002Fproperties\u002Fowner\n  why: A `$ref` could not be resolved in the source document.\n  fix: Add the missing definition under components.schemas, or fix the $ref.\n  docs: https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-ref-not-found\n\nKubb failed: 1 error (plugin-ts). Exit code 1.\nRerun with --reporter json for machine-readable diagnostics.",[21,74,75,32,80,32,85,32,90,32,95,32,100,32,104,32,109],{"class":23},[25,76,77],{"class":27,"style":28},[25,78,79],{},"error KUBB_REF_NOT_FOUND [plugin-ts]: Could not find #\u002Fcomponents\u002Fschemas\u002FOwner",[25,81,82],{"class":27,"style":28},[25,83,84],{},"  at: #\u002Fcomponents\u002Fschemas\u002FPet\u002Fproperties\u002Fowner",[25,86,87],{"class":27,"style":28},[25,88,89],{},"  why: A `$ref` could not be resolved in the source document.",[25,91,92],{"class":27,"style":28},[25,93,94],{},"  fix: Add the missing definition under components.schemas, or fix the $ref.",[25,96,97],{"class":27,"style":28},[25,98,99],{},"  docs: https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-ref-not-found",[25,101,102],{"class":27,"style":28},[25,103,37],{},[25,105,106],{"class":27,"style":28},[25,107,108],{},"Kubb failed: 1 error (plugin-ts). Exit code 1.",[25,110,111],{"class":27,"style":28},[25,112,113],{},"Rerun with --reporter json for machine-readable diagnostics.",[115,116,118],"h2",{"id":117},"codes","Codes",[10,120,121],{},"Find the code printed by Kubb below. Each entry explains the cause and the fix.",[115,123,125],{"id":124},"errors","Errors",[10,127,128],{},"An error fails the run with a non-zero exit code.",[130,131,133],"h3",{"id":132},"kubb-adapter-failed","KUBB_ADAPTER_FAILED: Adapter failed",[10,135,136,137,140],{},"The adapter threw an unexpected error while parsing the input. Errors the adapter reports on purpose, such as ",[21,138,139],{},"KUBB_REF_NOT_FOUND",", keep their own code.",[10,142,143,144,147,148,151,152,159,160,163],{},"Check the input and the adapter options. If it is a bug, report it to the adapter's maintainers with the stack trace. Kubb prints the stack for this code, and ",[21,145,146],{},"--reporter json"," includes it as ",[21,149,150],{},"stack",". When the adapter sets ",[153,154,156],"a",{"href":155},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions#meta",[21,157,158],{},"meta.issues",", Kubb prints its issue tracker as a ",[21,161,162],{},"report:"," link.",[130,165,167],{"id":166},"kubb-adapter-required","KUBB_ADAPTER_REQUIRED: Adapter required",[10,169,170],{},"An action needs an adapter but none is configured.",[10,172,173,174,177,178,181,182,185],{},"Set ",[21,175,176],{},"adapter"," in your config, for example ",[21,179,180],{},"adapterOas()",". Standard ",[21,183,184],{},"defineConfig"," supplies the default OpenAPI adapter, so this catalog code is not currently emitted for an omitted adapter.",[130,187,189],{"id":188},"kubb-barrel-duplicate-export","KUBB_BARREL_DUPLICATE_EXPORT: Duplicate barrel export",[10,191,192],{},"Two files in the same barrel directory export the same name. The barrel keeps the first export and drops the rest, so the generated code still parses, but the run is marked failed.",[10,194,195],{},"Rename the colliding declarations, change the resolver, or separate their output directories. A type and a value may share a name.",[130,197,199],{"id":198},"kubb-clean-root","KUBB_CLEAN_ROOT: Clean targets the project root",[10,201,202,205,206,209,210,213],{},[21,203,204],{},"output.clean"," removes generated code before a build. Kubb stops the build instead of wiping your project when ",[21,207,208],{},"output.path"," resolves to the project root or a parent of it, which would delete ",[21,211,212],{},"kubb.config"," and every source file.",[10,215,216,217,220,221,223],{},"Use a generated subdirectory such as ",[21,218,219],{},".\u002Fsrc\u002Fgen",". Disable ",[21,222,204],{}," if it contains hand-written files. Kubb rejects cleaning the project root or a parent directory.",[130,225,227],{"id":226},"kubb-format-failed","KUBB_FORMAT_FAILED: Format failed",[10,229,230],{},"The formatter pass over the generated files failed. Formatting runs after generation. The files are written, but the run is marked failed.",[10,232,233,234,237],{},"Check that the formatter is installed and its config is valid. Run it against the output directory to inspect the error, or change ",[21,235,236],{},"output.format",".",[130,239,241],{"id":240},"kubb-incompatible-dependency","KUBB_INCOMPATIBLE_DEPENDENCY: Incompatible dependency",[10,243,244,245,248,249,252,253,256,257,237],{},"A plugin's ",[21,246,247],{},"dependencies"," record sets a ",[21,250,251],{},"version"," range, and the configured plugin's ",[21,254,255],{},"meta.version"," falls outside it. Kubb skips the check when the dependency has no ",[21,258,255],{},[10,260,261],{},"Install a version of the dependency inside the range, or a version of the dependent plugin that supports the installed dependency.",[130,263,265],{"id":264},"kubb-incompatible-extension","KUBB_INCOMPATIBLE_EXTENSION: Incompatible extension",[10,267,268,269,272,273,276],{},"A plugin sets ",[21,270,271],{},"meta.compatibility.kubb"," or ",[21,274,275],{},"meta.compatibility.node"," to a range the running Kubb or Node.js version does not satisfy. Kubb checks this before any plugin runs.",[10,278,279],{},"Upgrade Kubb or Node.js to a version in the range, or install a version of the plugin that supports your current Kubb and Node.js.",[130,281,283],{"id":282},"kubb-git-input-failed","KUBB_GIT_INPUT_FAILED: Git input failed",[10,285,286,287,290,291,294,295,298],{},"A git ",[21,288,289],{},"input"," (",[21,292,293],{},"git+\u003Crepo>#\u003Cref>:\u003Cpath>",") is malformed, or ",[21,296,297],{},"git"," could not fetch it: git is not installed, the repository or ref does not exist, or the credentials were refused.",[10,300,301,302,304,305,308],{},"Write the input as ",[21,303,293],{},". Run ",[21,306,307],{},"git fetch --depth 1 \u003Crepo> \u003Cref>"," yourself to see the git error, and set up a credential helper or SSH key for a private repository.",[130,310,312],{"id":311},"kubb-input-not-found","KUBB_INPUT_NOT_FOUND: Input not found",[10,314,315,316,318,319,322],{},"The file set as ",[21,317,289],{}," (or passed as ",[21,320,321],{},"kubb generate PATH",") could not be read. The OpenAPI adapter checks the path before parsing, so the run stops here instead of failing later with a vague read error.",[10,324,325,326,329],{},"Check that the file exists and is readable. Use a path relative to ",[21,327,328],{},"kubb.config.ts",", an absolute path, or a full URL for a remote spec.",[130,331,333],{"id":332},"kubb-input-request-failed","KUBB_INPUT_REQUEST_FAILED: Input request failed",[10,335,336,337,339],{},"A URL set as ",[21,338,289],{}," answered with a 4xx or 5xx status instead of the OpenAPI document. The server was reached, so either the URL is wrong or the endpoint refused to serve the document.",[10,341,342,343,346,347,350],{},"Fetch the URL with ",[21,344,345],{},"curl"," and confirm it serves the OpenAPI document. For a protected document, download it and use the local file. Check server logs for a 5xx response. This also applies to remote ",[21,348,349],{},"$ref"," requests.",[130,352,354],{"id":353},"kubb-input-required","KUBB_INPUT_REQUIRED: Input required",[10,356,357,358,360],{},"An adapter is configured but no ",[21,359,289],{}," was provided, so there is nothing to parse.",[10,362,173,363,365],{},[21,364,289],{}," to a file path, URL, inline JSON\u002FYAML spec, or parsed document. If merging documents, provide at least one input.",[130,367,369],{"id":368},"kubb-input-unreachable","KUBB_INPUT_UNREACHABLE: Input unreachable",[10,371,336,372,374],{},[21,373,289],{}," never answered, so the request failed before a status came back.",[10,376,377],{},"Start the server and check its host and port. Fetch the URL from the machine running Kubb. Connect to any required VPN or proxy, or use a downloaded spec. The message includes the connection failure reason.",[130,379,381],{"id":380},"kubb-internal-error","KUBB_INTERNAL_ERROR: Internal error",[10,383,384],{},"Kubb hit a state it does not expect. This is a bug in Kubb, not in your config or your spec.",[10,386,387,388,272,390,393,394,398],{},"Rerun with ",[21,389,146],{},[21,391,392],{},"--verbose"," to get the stack. Then ",[153,395,397],{"href":396},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fissues","open an issue"," with the spec and config that trigger it.",[130,400,402],{"id":401},"kubb-invalid-document","KUBB_INVALID_DOCUMENT: Invalid document",[10,404,405,406,408,409,412,413,416],{},"The document resolved from ",[21,407,289],{}," cannot be read as an OpenAPI or Swagger document. Its JSON or YAML has a syntax error, it declares neither ",[21,410,411],{},"openapi"," nor ",[21,414,415],{},"swagger",", or its version cannot be upgraded to OpenAPI 3.1.",[10,418,419,420,422],{},"Fix the syntax at the line the message reports, and check that ",[21,421,289],{}," points at the spec and not an HTML page. Use a Swagger 2.0, OpenAPI 3.0, or OpenAPI 3.1 document, and pass the document itself rather than a wrapper. Missing versions fail even when validation is disabled.",[130,424,426],{"id":425},"kubb-invalid-plugin-options","KUBB_INVALID_PLUGIN_OPTIONS: Invalid plugin options",[10,428,429,430,433,434,437,438,441,442,445,446,449,450,453],{},"A plugin was given options that cannot be honored together. The main case is ",[21,431,432],{},"output.mode"," resolving to ",[21,435,436],{},"'file'"," while a ",[21,439,440],{},"group"," option is also set, or, for ",[21,443,444],{},"@kubb\u002Fplugin-fetch","\u002F",[21,447,448],{},"@kubb\u002Fplugin-axios",", while ",[21,451,452],{},"sdk.mode: 'tag'"," is set. Both pair a single-file output with an option that only makes sense split across several files, so the build stops instead of producing a layout the options do not describe.",[10,455,456,457,272,459,461,462,465,466,468],{},"Single-file output cannot use ",[21,458,440],{},[21,460,452],{},". Remove grouping, use ",[21,463,464],{},"sdk.mode: 'flat'",", or write to a directory. A file extension in ",[21,467,208],{}," implies file mode unless you explicitly select directory mode.",[130,470,472],{"id":471},"kubb-invalid-server-variable","KUBB_INVALID_SERVER_VARIABLE: Invalid server variable",[10,474,475,476,479],{},"A server variable resolves to a value that its ",[21,477,478],{},"enum"," does not allow.",[10,481,482,483,485],{},"Choose a variable value allowed by its ",[21,484,478],{},", correct the default, or update the enum to match the server.",[130,487,489],{"id":488},"kubb-legacy-input","KUBB_LEGACY_INPUT: Legacy input shape",[10,491,492,494,495,272,498,501],{},[21,493,289],{}," is a ",[21,496,497],{},"{ path }",[21,499,500],{},"{ data }"," wrapper. v4 used it to point at a document, and v5 takes the value directly.",[10,503,504,505,508,509,512,513,508,516,237],{},"Replace ",[21,506,507],{},"input: { path: '.\u002Fspec.yaml' }"," with ",[21,510,511],{},"input: '.\u002Fspec.yaml'",", or ",[21,514,515],{},"input: { data: spec }",[21,517,518],{},"input: spec",[130,520,522],{"id":521},"kubb-lint-failed","KUBB_LINT_FAILED: Lint failed",[10,524,525],{},"The linter pass over the generated files failed. Linting runs after generation. The files are written, but the run is marked failed.",[10,527,528,529,237],{},"Check that the linter is installed and configured. Run it manually against the output. Adjust rules for generated files or change ",[21,530,531],{},"output.lint",[130,533,535],{"id":534},"kubb-missing-dependency","KUBB_MISSING_DEPENDENCY: Missing dependency",[10,537,538,539,541,542,545,546,548],{},"A plugin lists another plugin in its ",[21,540,247],{}," record without ",[21,543,544],{},"optional: true",", and the config does not include it. A ",[21,547,247],{}," array only orders plugins and never raises this code.",[10,550,551,552,555,556,237],{},"Install the missing plugin and add it to ",[21,553,554],{},"plugins"," in ",[21,557,328],{},[130,559,561],{"id":560},"kubb-no-context","KUBB_NO_CONTEXT: No plugin context",[10,563,564,565,568,569,272,572,575,576,579,580,583],{},"A ",[21,566,567],{},"kubb\u002Fkit"," composable such as ",[21,570,571],{},"useKubb()",[21,573,574],{},"addGenerator()"," ran outside ",[21,577,578],{},"setup"," and ",[21,581,582],{},"kubb:plugin:setup",". Composables read the context of the plugin being set up, so outside setup there is no plugin to apply them to. The message names the composable that was called.",[10,585,586,587,272,589,591,592,595],{},"Call the composable inside ",[21,588,578],{},[21,590,582],{},". Code that setup awaits also works, because the context survives an ",[21,593,594],{},"await",". Generators and later hooks run after setup, so they cannot use composables.",[130,597,599],{"id":598},"kubb-parser-failed","KUBB_PARSER_FAILED: Parser failed",[10,601,602],{},"A parser threw an unexpected error while printing a generated file.",[10,604,605,606,147,608,610,611,159,615,163],{},"Check the parser options. If it is a bug, report it to the parser's maintainers with the stack trace. Kubb prints the stack for this code, and ",[21,607,146],{},[21,609,150],{},". When the parser sets ",[153,612,613],{"href":155},[21,614,158],{},[21,616,162],{},[130,618,620],{"id":619},"kubb-path-traversal","KUBB_PATH_TRAVERSAL: Path traversal",[10,622,623,624,626,627,630],{},"A resolved output path escaped the output directory. Kubb refuses to write outside ",[21,625,208],{},", so a crafted spec or a misconfigured ",[21,628,629],{},"group.name"," cannot drop files anywhere on disk.",[10,632,633,634,636,637,640,641,644,645,237],{},"Keep generated paths within ",[21,635,208],{}," and resolver ",[21,638,639],{},"file.path"," overrides within the project root. Reject ",[21,642,643],{},".."," and path separators in names from the spec or ",[21,646,629],{},[130,648,650],{"id":649},"kubb-plugin-failed","KUBB_PLUGIN_FAILED: Plugin failed",[10,652,653,654,657],{},"A plugin threw while generating, or reported an error through ",[21,655,656],{},"ctx.error",". The diagnostic is attributed to the plugin and fails the run.",[10,659,660,661,664,665,147,667,669,670,159,674,676,677,237],{},"Check the plugin options and the node at the ",[21,662,663],{},"at:"," pointer. If it is a bug, report it to the plugin's maintainers with the stack trace. Kubb prints the stack for this code, and ",[21,666,146],{},[21,668,150],{},". When the plugin sets ",[153,671,672],{"href":155},[21,673,158],{},[21,675,162],{}," link. Include a spec fragment that reproduces it. The diagnostic preserves an underlying error as its cause. For structured errors, plugin authors can use ",[153,678,680,272,683],{"href":679},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fengine#diagnostics",[21,681,682],{},"Diagnostics.Error",[21,684,685],{},"Diagnostics.report",[130,687,689],{"id":688},"kubb-plugin-not-found","KUBB_PLUGIN_NOT_FOUND: Plugin not found",[10,691,692],{},"A plugin requires another plugin that is not in the config.",[10,694,695,696,698,699,237],{},"Install the required plugin and add it to ",[21,697,554],{},", or remove its dependent plugin. Order does not matter. The adapter reads OpenAPI in v5, so do not add ",[21,700,701],{},"@kubb\u002Fplugin-oas",[130,703,705],{"id":704},"kubb-post-generate-failed","KUBB_POST_GENERATE_FAILED: Post-generate command failed",[10,707,708,709,712],{},"A post-generate command (",[21,710,711],{},"output.postGenerate",") exited with a non-zero status. These commands run after generation. The files are written, but the run is marked failed.",[10,714,715],{},"Run the command manually from the project root. Check the binary, spelling, and configuration. These commands run after formatting and linting.",[130,717,719],{"id":718},"kubb-ref-not-found","KUBB_REF_NOT_FOUND: Reference not found",[10,721,564,722,724],{},[21,723,349],{}," points at a definition that does not exist in the document.",[10,726,727,728,304,730,733],{},"Add the missing definition or correct the ",[21,729,349],{},[21,731,732],{},"kubb validate"," before generation. Bundle documents with external references when needed.",[130,735,737],{"id":736},"kubb-unknown","KUBB_UNKNOWN: Unknown error",[10,739,740],{},"A fallback for an error that does not yet carry a specific diagnostic code.",[10,742,743,744,747,748,751,752,754,755,758],{},"Run ",[21,745,746],{},"kubb generate --reporter file"," for a log under ",[21,749,750],{},".kubb\u002F",", or use ",[21,753,392],{},". Inspect the message and stack. Report unclear failures with the message and ",[21,756,757],{},"Environment:"," block. Unclassified errors have no suggested fix or docs URL in CLI output.",[115,760,762],{"id":761},"warnings","Warnings",[10,764,765],{},"A warning is reported and the run continues.",[130,767,769],{"id":768},"kubb-invalid-spec","KUBB_INVALID_SPEC: Invalid spec",[10,771,772,773,776,777,783,784,787],{},"The document does not pass OpenAPI schema validation. Kubb reports each problem and keeps generating, but the output can be incomplete or wrong. ",[21,774,775],{},"@kubb\u002Fadapter-oas"," checks this when ",[153,778,780],{"href":779},"\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas\u002Foptions#validate",[21,781,782],{},"validate"," is ",[21,785,786],{},"true",", the default.",[10,789,790,791,796,797,800],{},"Fix the reported problem in the spec. Run ",[153,792,794],{"href":793},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate",[21,795,732],{}," to list every error with its location. Set ",[21,798,799],{},"validate: false"," on the adapter to skip the check.",[130,802,804],{"id":803},"kubb-plugin-warning","KUBB_PLUGIN_WARNING: Plugin warning",[10,806,807,808,237],{},"A plugin reported a non-fatal warning through ",[21,809,810],{},"ctx.warn",[10,812,813,814,816],{},"Read the message and adjust the input or plugin options as needed. Plugin authors can use ",[21,815,685],{}," for a stable code and source pointer.",[130,818,820],{"id":819},"kubb-unsupported-format","KUBB_UNSUPPORTED_FORMAT: Unsupported format",[10,822,823,824,827],{},"A schema's ",[21,825,826],{},"format"," is not one Kubb maps to a specific type, so it falls back to the base type.",[10,829,830],{},"Use a supported format, omit it if the base type is sufficient, or map it through a custom parser or plugin.",[115,832,834],{"id":833},"info","Info",[10,836,837],{},"An info diagnostic is advisory and never fails the run.",[130,839,841],{"id":840},"kubb-deprecated","KUBB_DEPRECATED: Deprecated",[10,843,844,845,237],{},"A referenced schema or operation is marked ",[21,846,847],{},"deprecated",[10,849,850],{},"Move away from the deprecated definition when possible. Generation continues unchanged, and the notice may recur on each run.",[130,852,854],{"id":853},"kubb-performance","KUBB_PERFORMANCE: Performance",[10,856,857],{},"Records a plugin's elapsed time. Kubb collects one per plugin during a build.",[10,859,860,861,864],{},"This bookkeeping code is not printed as a terminal diagnostic. Run ",[21,862,863],{},"kubb generate --verbose"," to inspect plugin timings. The reported duration sums generation time and excludes config loading, formatting, linting, and post-generate hooks.",[130,866,868],{"id":867},"kubb-plugin-info","KUBB_PLUGIN_INFO: Plugin info",[10,870,871,872,237],{},"A plugin reported an informational message through ",[21,873,874],{},"ctx.info",[10,876,877,878,816],{},"No action is required. The plugin name and message appear in the summary and JSON report. Plugin authors can use ",[21,879,685],{},[130,881,883],{"id":882},"kubb-update-available","KUBB_UPDATE_AVAILABLE: Update available",[10,885,886],{},"A newer Kubb version is published on npm than the one running.",[10,888,889],{},"Update Kubb and your project plugins through your package manager.",[115,891,893],{"id":892},"machine-readable-output","Machine-readable output",[10,895,896,899,900,903],{},[21,897,898],{},"kubb generate --reporter json"," prints a stable report to stdout. The output is a JSON array with\none report per config, so a single-config run still prints ",[21,901,902],{},"[ ... ]",". CI can read diagnostics\nwithout scraping the terminal:",[14,905,909],{"language":906,"filename":907,"code":908,"class":19},"json","Report","[\n  {\n    \"name\": \"\",\n    \"status\": \"failed\",\n    \"plugins\": { \"passed\": 2, \"failed\": [\"plugin-zod\"], \"total\": 3 },\n    \"counts\": { \"errors\": 1, \"warnings\": 0, \"infos\": 0 },\n    \"filesCreated\": 0,\n    \"durationMs\": 312,\n    \"output\": \"\u002Fproject\u002Fsrc\u002Fgen\",\n    \"timings\": [{ \"plugin\": \"plugin-ts\", \"durationMs\": 84 }],\n    \"diagnostics\": [\n      {\n        \"code\": \"KUBB_REF_NOT_FOUND\",\n        \"severity\": \"error\",\n        \"message\": \"Could not find a definition for #\u002Fcomponents\u002Fschemas\u002FPet.\",\n        \"title\": \"Reference not found\",\n        \"cause\": \"A `$ref` could not be resolved in the source document.\",\n        \"location\": { \"kind\": \"schema\", \"pointer\": \"#\u002Fcomponents\u002Fschemas\u002FPet\" },\n        \"help\": \"Add the schema under components.schemas, or fix the $ref. Run `kubb validate` to check the spec.\",\n        \"docsUrl\": \"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-ref-not-found\"\n      }\n    ]\n  }\n]",[21,910,912,32,918,32,923,32,939,32,951,32,992,32,1028,32,1039,32,1051,32,1063,32,1092,32,1099,32,1104,32,1116,32,1128,32,1140,32,1152,32,1164,32,1191,32,1203,32,1213,32,1218,32,1223,32,1228],{"class":911},"language-json",[25,913,914],{"class":27,"style":28},[25,915,917],{"style":916},"color:#24292E;--shiki-dark:#E1E4E8","[",[25,919,920],{"class":27,"style":28},[25,921,922],{"style":916},"  {",[25,924,925,929,932,936],{"class":27,"style":28},[25,926,928],{"style":927},"color:#005CC5;--shiki-dark:#79B8FF","    \"name\"",[25,930,931],{"style":916},": ",[25,933,935],{"style":934},"color:#032F62;--shiki-dark:#9ECBFF","\"\"",[25,937,938],{"style":916},",",[25,940,941,944,946,949],{"class":27,"style":28},[25,942,943],{"style":927},"    \"status\"",[25,945,931],{"style":916},[25,947,948],{"style":934},"\"failed\"",[25,950,938],{"style":916},[25,952,953,956,959,962,964,967,970,972,975,978,981,984,986,989],{"class":27,"style":28},[25,954,955],{"style":927},"    \"plugins\"",[25,957,958],{"style":916},": { ",[25,960,961],{"style":927},"\"passed\"",[25,963,931],{"style":916},[25,965,966],{"style":927},"2",[25,968,969],{"style":916},", ",[25,971,948],{"style":927},[25,973,974],{"style":916},": [",[25,976,977],{"style":934},"\"plugin-zod\"",[25,979,980],{"style":916},"], ",[25,982,983],{"style":927},"\"total\"",[25,985,931],{"style":916},[25,987,988],{"style":927},"3",[25,990,991],{"style":916}," },",[25,993,994,997,999,1002,1004,1007,1009,1012,1014,1017,1019,1022,1024,1026],{"class":27,"style":28},[25,995,996],{"style":927},"    \"counts\"",[25,998,958],{"style":916},[25,1000,1001],{"style":927},"\"errors\"",[25,1003,931],{"style":916},[25,1005,1006],{"style":927},"1",[25,1008,969],{"style":916},[25,1010,1011],{"style":927},"\"warnings\"",[25,1013,931],{"style":916},[25,1015,1016],{"style":927},"0",[25,1018,969],{"style":916},[25,1020,1021],{"style":927},"\"infos\"",[25,1023,931],{"style":916},[25,1025,1016],{"style":927},[25,1027,991],{"style":916},[25,1029,1030,1033,1035,1037],{"class":27,"style":28},[25,1031,1032],{"style":927},"    \"filesCreated\"",[25,1034,931],{"style":916},[25,1036,1016],{"style":927},[25,1038,938],{"style":916},[25,1040,1041,1044,1046,1049],{"class":27,"style":28},[25,1042,1043],{"style":927},"    \"durationMs\"",[25,1045,931],{"style":916},[25,1047,1048],{"style":927},"312",[25,1050,938],{"style":916},[25,1052,1053,1056,1058,1061],{"class":27,"style":28},[25,1054,1055],{"style":927},"    \"output\"",[25,1057,931],{"style":916},[25,1059,1060],{"style":934},"\"\u002Fproject\u002Fsrc\u002Fgen\"",[25,1062,938],{"style":916},[25,1064,1065,1068,1071,1074,1076,1079,1081,1084,1086,1089],{"class":27,"style":28},[25,1066,1067],{"style":927},"    \"timings\"",[25,1069,1070],{"style":916},": [{ ",[25,1072,1073],{"style":927},"\"plugin\"",[25,1075,931],{"style":916},[25,1077,1078],{"style":934},"\"plugin-ts\"",[25,1080,969],{"style":916},[25,1082,1083],{"style":927},"\"durationMs\"",[25,1085,931],{"style":916},[25,1087,1088],{"style":927},"84",[25,1090,1091],{"style":916}," }],",[25,1093,1094,1097],{"class":27,"style":28},[25,1095,1096],{"style":927},"    \"diagnostics\"",[25,1098,974],{"style":916},[25,1100,1101],{"class":27,"style":28},[25,1102,1103],{"style":916},"      {",[25,1105,1106,1109,1111,1114],{"class":27,"style":28},[25,1107,1108],{"style":927},"        \"code\"",[25,1110,931],{"style":916},[25,1112,1113],{"style":934},"\"KUBB_REF_NOT_FOUND\"",[25,1115,938],{"style":916},[25,1117,1118,1121,1123,1126],{"class":27,"style":28},[25,1119,1120],{"style":927},"        \"severity\"",[25,1122,931],{"style":916},[25,1124,1125],{"style":934},"\"error\"",[25,1127,938],{"style":916},[25,1129,1130,1133,1135,1138],{"class":27,"style":28},[25,1131,1132],{"style":927},"        \"message\"",[25,1134,931],{"style":916},[25,1136,1137],{"style":934},"\"Could not find a definition for #\u002Fcomponents\u002Fschemas\u002FPet.\"",[25,1139,938],{"style":916},[25,1141,1142,1145,1147,1150],{"class":27,"style":28},[25,1143,1144],{"style":927},"        \"title\"",[25,1146,931],{"style":916},[25,1148,1149],{"style":934},"\"Reference not found\"",[25,1151,938],{"style":916},[25,1153,1154,1157,1159,1162],{"class":27,"style":28},[25,1155,1156],{"style":927},"        \"cause\"",[25,1158,931],{"style":916},[25,1160,1161],{"style":934},"\"A `$ref` could not be resolved in the source document.\"",[25,1163,938],{"style":916},[25,1165,1166,1169,1171,1174,1176,1179,1181,1184,1186,1189],{"class":27,"style":28},[25,1167,1168],{"style":927},"        \"location\"",[25,1170,958],{"style":916},[25,1172,1173],{"style":927},"\"kind\"",[25,1175,931],{"style":916},[25,1177,1178],{"style":934},"\"schema\"",[25,1180,969],{"style":916},[25,1182,1183],{"style":927},"\"pointer\"",[25,1185,931],{"style":916},[25,1187,1188],{"style":934},"\"#\u002Fcomponents\u002Fschemas\u002FPet\"",[25,1190,991],{"style":916},[25,1192,1193,1196,1198,1201],{"class":27,"style":28},[25,1194,1195],{"style":927},"        \"help\"",[25,1197,931],{"style":916},[25,1199,1200],{"style":934},"\"Add the schema under components.schemas, or fix the $ref. Run `kubb validate` to check the spec.\"",[25,1202,938],{"style":916},[25,1204,1205,1208,1210],{"class":27,"style":28},[25,1206,1207],{"style":927},"        \"docsUrl\"",[25,1209,931],{"style":916},[25,1211,1212],{"style":934},"\"https:\u002F\u002Fkubb.dev\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-ref-not-found\"",[25,1214,1215],{"class":27,"style":28},[25,1216,1217],{"style":916},"      }",[25,1219,1220],{"class":27,"style":28},[25,1221,1222],{"style":916},"    ]",[25,1224,1225],{"class":27,"style":28},[25,1226,1227],{"style":916},"  }",[25,1229,1230],{"class":27,"style":28},[25,1231,1232],{"style":916},"]",[10,1234,1235,1236,1239,1240,1243,1244,1247,1248,1251],{},"Each config emits one report. ",[21,1237,1238],{},"counts"," totals the ",[21,1241,1242],{},"problem"," diagnostics by severity. ",[21,1245,1246],{},"timings"," lists\nper-plugin durations slowest first. ",[21,1249,1250],{},"name"," is the config name, empty when unnamed.",[10,1253,1254,1255,579,1258,1261,1262,1265,1266,1269,1270,1273,1274,1277,1278,237],{},"Each diagnostic carries the catalog ",[21,1256,1257],{},"title",[21,1259,1260],{},"cause"," for its code, so an agent can act on it\nwithout opening this page. ",[21,1263,1264],{},"help"," falls back to the catalog fix when the diagnostic has none.\nWhen the diagnostic wraps a thrown error, ",[21,1267,1268],{},"causes"," lists the messages of the underlying errors,\nand a crash (",[21,1271,1272],{},"KUBB_UNKNOWN"," or a ",[21,1275,1276],{},"*_FAILED"," extension code) adds the root ",[21,1279,150],{},[10,1281,1282,1283,1289],{},"The exit code is unchanged: non-zero on any error. See ",[153,1284,1286],{"href":1285},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fgenerate#reporters",[21,1287,1288],{},"--reporter","\nfor the other reporters.",{"title":37,"searchDepth":1291,"depth":1291,"links":1292},5,[1293,1295,1325,1330,1336],{"id":117,"depth":1294,"text":118},2,{"id":124,"depth":1294,"text":125,"children":1296},[1297,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324],{"id":132,"depth":1298,"text":133},3,{"id":166,"depth":1298,"text":167},{"id":188,"depth":1298,"text":189},{"id":198,"depth":1298,"text":199},{"id":226,"depth":1298,"text":227},{"id":240,"depth":1298,"text":241},{"id":264,"depth":1298,"text":265},{"id":282,"depth":1298,"text":283},{"id":311,"depth":1298,"text":312},{"id":332,"depth":1298,"text":333},{"id":353,"depth":1298,"text":354},{"id":368,"depth":1298,"text":369},{"id":380,"depth":1298,"text":381},{"id":401,"depth":1298,"text":402},{"id":425,"depth":1298,"text":426},{"id":471,"depth":1298,"text":472},{"id":488,"depth":1298,"text":489},{"id":521,"depth":1298,"text":522},{"id":534,"depth":1298,"text":535},{"id":560,"depth":1298,"text":561},{"id":598,"depth":1298,"text":599},{"id":619,"depth":1298,"text":620},{"id":649,"depth":1298,"text":650},{"id":688,"depth":1298,"text":689},{"id":704,"depth":1298,"text":705},{"id":718,"depth":1298,"text":719},{"id":736,"depth":1298,"text":737},{"id":761,"depth":1294,"text":762,"children":1326},[1327,1328,1329],{"id":768,"depth":1298,"text":769},{"id":803,"depth":1298,"text":804},{"id":819,"depth":1298,"text":820},{"id":833,"depth":1294,"text":834,"children":1331},[1332,1333,1334,1335],{"id":840,"depth":1298,"text":841},{"id":853,"depth":1298,"text":854},{"id":867,"depth":1298,"text":868},{"id":882,"depth":1298,"text":883},{"id":892,"depth":1294,"text":893},"Reference for Kubb's diagnostic codes, the stable codes Kubb prints when a build fails, with causes and fixes.","md",{"layout":1340,"title":5,"description":1337,"outline":1341,"order":1342,"navigation":1343},"doc",[1294,1298],7,{"title":5,"icon":1344},"i-iconoir-warning-triangle",{"layout":1340,"outline":1346},[1294,1298],{"title":5,"icon":1344},"\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics",{"title":5,"description":1337},{"loc":1348},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics.md","docs\u002F5.x\u002Freference\u002Fdiagnostics","scSAIBJz568ra-ERi3RYFe3n2BeSaAoYrgLTpMlRhKc",false,1792685332251]