Nuxt · NUXT0081

Declare Nuxt module meta

Finds the default-exported defineNuxtModule() of a Nuxt module package that does not declare meta.name, meta.configKey, or meta.compatibility.
NUXT0081vite-doctor/nuxtmoduleswarnSuggestion

Run this rule

pnpm nuxt doctor --rules nuxt/module/require-meta

Why it matters

@nuxt/kit identifies a module by meta.name: it installs the module only once and hasNuxtModule() looks it up by name. meta.configKey is the nuxt.config key that holds the module options and falls back to meta.name, so a scoped package name makes options awkward to set. meta.compatibility lets @nuxt/kit check the installed Nuxt version before setup and disable the module with a clear message. Doctor only asks for configKey when the module accepts options and meta.name is not already a usable key.

Declare meta.name with the package name, a camelCase meta.configKey, and meta.compatibility with the supported Nuxt range.

Example

Declare module meta

Before

export default defineNuxtModule({
  setup(options, nuxt) { /* ... */ },
})

After

export default defineNuxtModule<ModuleOptions>({
  meta: { name: '@acme/nuxt-analytics', configKey: 'analytics', compatibility: { nuxt: '>=4.0.0' } },
  defaults: { enabled: true },
  setup(options, nuxt) { /* ... */ },
})
Copyright © 2026