Troubleshooting
This section covers the failure modes that still matter in the current Nuxt-only module workflow.
Start with the symptom
Generation and build
- Module does not generate anything -> Build issues
- OpenAPI parsing fails -> Generation errors
- Generated code fails TypeScript checks -> Type errors
Generated client layer
- Generated composables are missing or not auto-imported -> Composables issues
- Requests fail at runtime -> Runtime errors
Generated server layer
nuxtServerroutes are missing or broken -> Server issues
Performance
- Build or regeneration is too slow -> Performance
Current product assumptions
The guidance in this folder assumes the current package shape:
- configuration lives in
nuxt.config.tsunderopenapi - SDK and client outputs are generated under
openapi/by default - generated client composables live under
openapi/composables/ nuxtServerwrites Nitro routes toserverRoutePath, defaulting toserver/routes/api- the shared client runtime reads
runtimeConfig.public.apiBaseUrlwhenbaseURLis not passed per call
Common problems
Generation never runs
Most often one of these is true:
openapi.inputis missing, so the module skips generation- the current command is
nuxt devbutenableDevBuildisfalse - the current command is
nuxt buildbutenableProductionBuildisfalse
See Build issues.
Generated composables are not found
Most often one of these is true:
- the needed generator is not enabled
- the symbol name is based on a different
operationIdthan expected - the app is importing from an old path instead of the generated
openapi/tree
See Composables issues.
Requests fail even though generation succeeded
Most often one of these is true:
runtimeConfig.public.apiBaseUrlis missing- authentication is not wired through
useApiHeaders()orgetGlobalApiCallbacks - the browser is calling an upstream API directly and hitting CORS restrictions
See Runtime errors.
nuxtServer output is missing or broken
Most often one of these is true:
generatorsdoes not includenuxtServerserverRoutePathpoints somewhere unexpectedapiBaseUrlor optional BFF files are not configured after generation
See Server issues.
What to include in a bug report
When reporting an issue, include:
- package version
- Nuxt version
- Node version
- relevant
openapisection fromnuxt.config.ts - whether the failure happens in
nuxt dev,nuxt build, or both - a minimal OpenAPI excerpt that reproduces the problem
- the generated output path involved, such as
openapi/composables/use-fetchorserver/routes/api
Debugging hints
- Watch the Nuxt terminal for messages prefixed with
[nuxt-openapi-hyperfetch]. - Confirm that the expected generator is enabled before debugging the output.
- When in doubt, delete the generated output directory and let the module regenerate it from the current spec.
