Nuxt · NUXT0051

Use NuxtPage instead of RouterView

Finds Nuxt routing code that should use the supported NuxtPage over routerview pattern instead.
NUXT0051vite-doctor/nuxtroutingerrorAuto-fix

Run this rule

pnpm nuxt doctor --rules nuxt/routing/prefer-nuxtpage-over-routerview

Why it matters

NuxtPage connects routed views to Nuxt page metadata, transitions, keep-alive behavior, and Suspense handling.

Render routed pages with <NuxtPage>.

Example

Use NuxtPage over routerview

Before

<template>
  <RouterView />
</template>

After

<template>
  <NuxtPage />
</template>
Copyright © 2026