NuxtN
Nuxt8mo ago
5 replies
opalepatrick

Cannot find name 'useRuntimeConfig'.

Nuxt 3.16.1 + Bun + Docker: Server-side auto-imports not working

useRuntimeConfig() shows "Cannot find name" in server API routes despite:
✅ .nuxt/types/nitro-imports.d.ts exists with correct declarations
✅ tsconfig.json includes the nitro-imports file
✅ Client-side auto-imports work fine
✅ defineEventHandler, getQuery auto-import fine

Is this a known issue with Nuxt 3.16+ server-side auto-imports?
What's the recommended workaround that maintains runtime config single source of truth?

Environment: Nuxt 3.16.1, TypeScript 5.8.3, Bun 1.x, Docker container

Thanks in advance for any pointers
Was this page helpful?