-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydration error with scoped slots and component discovery (async components) #8904
Comments
Check out https://blog.lichter.io/posts/vue-hydration-error/ - hope that helps! You may have an issue with naming your components the same as native HTML5 element names. |
@danielroe Thank you for the quick response but I already tried it and it doesn't change anything. |
@danielroe don't know if this helps but i can reproduce the same error with non matching HTML5 element names https://codesandbox.io/s/elegant-neumann-6h3ju?file=/pages/index.vue |
Looks like that is an issue with slots in slotted components. Wondering if that's a vue-ssr-renderer thing |
@manniL not sure if i did it correctly but seems to be working fine the same exact code as my previous link in a plain vue cli app using vue-ssr-renderer. You can see it here https://codesandbox.io/s/ssr-vue-forked-rhoki?file=/src/App.vue |
Indeed. When explicitly importing the components it works as expected BTW: https://k11kl.sse.codesandbox.io/ I changed the title accordingly. |
I'm not sure if it is related to this issue, but as soon as I upgrade from Nuxt 2.14.12 to 2.15.2, I get a lot of Node version = 12.20. |
@mschoeffmann this specific issue persists in both versions. |
Would you be able to file an issue at https://github.com/nuxt/components/issues by chance? 🙏 |
This looks very similar to #6844. |
Waiting for upstream: vuejs/vue#11963 |
@pi0 Any chance we could get a new Nuxt release with the Edit: Apologies, I just realized that |
Thanks for your contribution to Nuxt!
Issues that are labeled as |
Versions
Reproduction
Hello everyone and thank you in advance.
I have a strange issue that I don't really understand what's the problem and how to deal with it.
I have installed a fresh nuxt ssr project.
I'm getting the following warning
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.
I have three simple components:
Form
,Input
,Button
.Form.vue
Input.vue
Button.vue
I use my components in
pages/index.vue
like this:If i use the
Form
component only once in the view i don't get the warning.If i use it twice i get it.
Steps to reproduce
Reproduction link
What is Expected?
All the components to render normally without any warnings or errors.
What is actually happening?
I get the following warning.
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.
Some extra notes
I know that wrapping the whole thing inside a
<client-only>
fixes the problem but i want to understand why is this happening in order to avoid it in future cases.Also if I remove
components: true
fromnuxt.config.js
and import the components normally again the warning is goneThe text was updated successfully, but these errors were encountered: