Nuxt · Routing

NUXT0046Do not use route objects as NuxtPage page keys

Flags route object page key in Nuxt routing code before it leaks into runtime behavior.

Why it happens

Nuxt routing APIs preserve prefetching, SSR behavior, and route state. Raw browser or Vue Router patterns can bypass that integration.

Fix

Remove route object page key, or move it to the Nuxt runtime/API that owns that behavior.

Example

Use scalar page keys

Before

<script setup lang="ts">
definePageMeta({
  key: route => route,
})
</script>

After

<script setup lang="ts">
definePageMeta({
  key: route => route.fullPath,
})
</script>

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/routing/no-route-object-page-key
Copyright © 2026