Nuxt · Imports

NUXT0035Do not shadow Nuxt useFetch

Flags conflicting useFetch import in Nuxt imports code before it leaks into runtime behavior.

Why it happens

Nuxt data fetching relies on stable keys, payload serialization, and request context. Bypassing those contracts can duplicate requests or lose SSR data.

Fix

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

Example

Avoid conflicting useFetch imports

Before

import { useFetch } from '@vueuse/core'

const { data } = useFetch('/api/user')

After

import { useFetch as useVueUseFetch } from '@vueuse/core'

const { data } = await useFetch('/api/user')

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-conflicting-usefetch-import
Copyright © 2026