Why it happens
Vue's compiler warns about invalid nesting inside one template, but not when the invalid child is another component's root. During SSR, the server sends the nesting as HTML and the browser's parser rewrites it: a <div> closes the open <p>, a <tr> gets an implied <tbody>, a nested <form> is dropped. Vue then hydrates against DOM it did not render and logs "Hydration node mismatch" or "Hydration children mismatch", patching or recreating the subtree.
Fix
Change the parent element to one that can contain the component's root, such as a <div> instead of a <p>, add the missing <tbody>, or change the component's root element to one that is valid in that parent.
Example
Wrap block content in a block element
Before
<!-- Card.vue -->
<template>
<div class="card"><slot /></div>
</template>
<!-- Page.vue -->
<template>
<p><Card>Hello</Card></p>
</template>
After
<!-- Card.vue -->
<template>
<div class="card"><slot /></div>
</template>
<!-- Page.vue -->
<template>
<div><Card>Hello</Card></div>
</template>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --framework vue --rules vue/ssr/no-invalid-root-nesting