Nuxt · Imports

NUXT0034Avoid auto-import name collisions

Flags auto import collision in Nuxt imports code before it leaks into runtime behavior.

Why it happens

Auto-imports are global within a project. Explicit names and imports prevent local code from shadowing framework composables.

Fix

Remove auto import collision, or move it to the Nuxt runtime/API that owns that behavior.

Example

Avoid auto-import name collisions

Before

export function useRoute() {
  return { path: '/custom' }
}

After

export function useCustomRoute() {
  return { path: '/custom' }
}

Verify the fix

Run only this rule after editing so the report stays focused on the diagnostic you are closing:

pnpm nuxt doctor --rules nuxt/imports/no-auto-import-collision
Copyright © 2026