Nuxt: [Vue warn]: Hydration completed but contains mismatches.
Server HTML and client render differed; Vue patched the DOM but logs the mismatch.
Hydration completed but contains mismatches.[Vue warn]: Hydration completed but contains mismatches.Nuxt Hydration completed but contains mismatchesHydration node mismatch Nuxt SSR[Vue warn]: Hydration text content mismatch Nuxt Meaning
Same causes as Vue SSR: non-deterministic values (Date.now, Math.random), browser-only data (localStorage, window.innerWidth), invalid HTML nesting, or async data that differs. Use useState for shared values, <ClientOnly>, onMounted, and stable ids (useId). Check Nuxt DevTools and the console diff.
Common causes
- Random/time values in templates
- Browser-only checks during SSR
- Invalid HTML (div in p)
- Different data on server/client
- Third-party scripts altering DOM before hydration
⚡ Quick fix
- Use
useStateoruseAsyncDatafor shared data - Wrap client-only parts in
<ClientOnly> - Fix HTML nesting; use
useId()
Detailed fix by platform
Nuxt
<ClientOnly><MapWidget /><template #fallback>Loading…</template></ClientOnly>
How to diagnose
- Value — Deterministic?
- Component — ClientOnly?
- HTML — Valid?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- [Vue warn]: Failed to locate Teleport target with selector Vue: [Vue warn]: Failed to locate Teleport target with selector "#modal". Note the target element must exist before the component is mounted
- [Vue warn]: Hydration node/text/children mismatch Vue: [Vue warn]: Hydration text content mismatch / Hydration node mismatch: server rendered element contains more child nodes than client vdom
- Hydration error: <div> cannot be a descendant of <p> Next.js: Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p> / In HTML, <p> cannot be a descendant of <p>. This will cause a hydration error
Most viewed in Vue
- Property was accessed during render but is not defined Vue: [Vue warn]: Property "x" was accessed during render but is not defined on instance
- Failed to resolve component Vue: [Vue warn]: Failed to resolve component: x
- Avoid mutating a prop directly Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026