Nuxt · NUXT0098
Render NuxtPage in parent pages
Finds a parent route component that never renders `<NuxtPage>` or `<RouterView>` directly or through another component. Doctor uses Nuxt's prepared parent-child relationships when available, including across layers. Without those relationships, it uses standard directory conventions only when configuration and layer evidence allow it. Unresolved render targets are treated as possibly rendering the outlet.
nuxt/routing/parent-page-requires-nuxtpagesrc/rule-packs/nuxt/rules/nuxt/parent-page-requires-nuxt-page.ts Upstream docs Run this rule
pnpm nuxt doctor --rules nuxt/routing/parent-page-requires-nuxtpage
Why it matters
Nuxt turns pages/users.vue next to pages/users/id.vue into a parent route with a child route. The child renders inside the parent's <NuxtPage>, so without one, navigating to /users/1 shows only the parent page. Nuxt reports this in development as NUXT_E4016, "the parent page does not render <NuxtPage />, so the nested page cannot be displayed", or as NUXT_E4011 when no page renders <NuxtPage> at all.
Recommended fix
Render <NuxtPage /> in the parent page where the child should appear. If the pages are not meant to nest, move pages/users.vue to pages/users/index.vue.
Useful links
Example
Render the child route in the parent page
Before
<!-- app/pages/users.vue, next to app/pages/users/[id].vue -->
<template>
<h1>Users</h1>
</template>
After
<!-- app/pages/users.vue -->
<template>
<div>
<h1>Users</h1>
<NuxtPage />
</div>
</template>