Nitro · Runtime config
NITRO0013Remove the event argument from Nitro 3 runtime config
Nitro 3 reads runtime config without a request event argument.
vite-doctor/nitroruntime-configwarnSuggestion
Why it happens
Nitro 3 replaced the event-aware Nitro 2 signature with zero-argument useRuntimeConfig().
Fix
Use useRuntimeConfig() in Nitro 3 server code.
Example
Use the Nitro 3 runtime config signature
Before
export default defineHandler((event) => {
return useRuntimeConfig(event).apiSecret
})
After
export default defineHandler(() => {
return useRuntimeConfig().apiSecret
})
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --framework nitro --rules nitro/runtime/no-event-runtime-config-in-server