Nuxt · NUXT0083

Import Nuxt helpers explicitly in module runtime files

Finds runtime files of a published Nuxt module package that call Nuxt, Vue, Nitro, or h3 auto-imports without importing them.
NUXT0083vite-doctor/nuxtmoduleserrorAuto-fix

Run this rule

pnpm nuxt doctor --rules nuxt/module/explicit-runtime-imports

Why it matters

Nuxt and Nitro skip auto-import transforms for files inside node_modules, where a published module's runtime directory lives. The module playground links the source, so auto-imports work during development and the missing import only fails as a ReferenceError in projects that install the module. Doctor checks files under the runtime directory next to the module entry, such as src/runtime/, and skips local modules and packages that are also Nuxt layers because Nuxt still transforms those.

Import runtime helpers explicitly from #imports, or from their source package such as vue or h3.

Example

Import runtime helpers in a module plugin

Before

// src/runtime/plugin.ts
export default defineNuxtPlugin(() => {
  const config = useRuntimeConfig()
})

After

// src/runtime/plugin.ts
import { defineNuxtPlugin, useRuntimeConfig } from '#imports'

export default defineNuxtPlugin(() => {
  const config = useRuntimeConfig()
})
Copyright © 2026