Nuxt · NUXT0026
Use Nuxt data fetching primitives for SSR render data
Flags raw fetch in setup in Nuxt fetch code before it leaks into runtime behavior.
nuxt/fetch/no-raw-fetch-in-setupsrc/rule-packs/nuxt/rules/nuxt/no-raw-fetch-in-setup.ts Upstream docs Run this rule
pnpm nuxt doctor --rules nuxt/fetch/no-raw-fetch-in-setup
Why it matters
Nuxt data fetching relies on stable keys, payload serialization, and request context. Bypassing those contracts can duplicate requests or lose SSR data.
Recommended fix
Remove raw fetch in setup, or move it to the Nuxt runtime/API that owns that behavior.
Useful links
Example
Use Nuxt data fetching in setup
Before
<script setup lang="ts">
const data = await $fetch('/api/user')
</script>
After
<script setup lang="ts">
const { data } = await useFetch('/api/user')
</script>