Nuxt · Data fetching

NUXT0039Do not treat immediate:false async data as manual-only

Flags manual action useFetch in Nuxt project 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 manual action useFetch, or move it to the Nuxt runtime/API that owns that behavior.

Example

Use $fetch for manual mutations

Before

const { execute } = await useFetch('/api/orders', {
  method: 'POST',
  immediate: false,
})

After

async function submitOrder() {
  await $fetch('/api/orders', { method: 'POST' })
}

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/no-manual-action-usefetch
Copyright © 2026