Nuxt · NUXT0028
Use stable keys for async data payload entries
Checks that Nuxt fetch code includes the stable useAsyncData key needed for predictable behavior.
nuxt/fetch/require-stable-asyncdata-keysrc/rule-packs/nuxt/rules/nuxt/require-stable-async-data-key.ts Upstream docs Run this rule
pnpm nuxt doctor --rules nuxt/fetch/require-stable-asyncdata-key
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
Add stable useAsyncData key where Nuxt expects it, close to the code that depends on it.
Useful links
Example
Use stable async data keys
Before
const key = Date.now().toString()
const { data } = await useAsyncData(key, () => $fetch('/api/user'))
After
const { data } = await useAsyncData('user', () => $fetch('/api/user'))