Nuxt tree missmatch
See original GitHub issueDescribe the bug
Happening since 2.15.0.
<b-card no-body class="text-center">
<div class="bg-secondary text-light">
This is some content without the default <samp><b-card-body></samp> section. Notice the
lack of padding between the card's border and this gray <samp><div></samp>.
</div>
</b-card>
Vue throws:
[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
, or missing
. Bailing hydration and performing full client-side render.Expected behavior
You can also see that the SSR content is empty but then hydrates later.
Versions
Libraries:
- BootstrapVue: 2.15.0
- Bootstrap: 4.5.0
- Vue: 2.6.11
- Nuxt: 2.12.2
Environment:
- OS: Ubuntu
- Browser: Chrome
- Version: 83.0.4103.61
Demo link
https://codesandbox.io/s/admiring-fast-tdx6c?file=/pages/index.vue
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Mismatching childNodes vs. VNodes · Issue #1594 · nuxt/nuxt.js"The client-side rendered virtual DOM tree is not matching server-rendered content." and a warning "Mismatching childNodes vs. VNodes:".Read more >[Vue warn]: The client-side rendered virtual DOM tree is not ...I am thinking the mismatch of SSR vs clients is connected to the incorrect export, probably solvable by some webpack config but after...Read more >Virtual DOM tree mismatch between client and server - YouTubeThe client-side rendered virtual DOM tree is not matching server... ... about asyncData a Nuxt life cycle hook this fixes the client-side ...Read more >Server-Side Rendering (SSR) - Vue.jsNuxt is a higher-level framework built on top of the Vue ecosystem which ... Hydration mismatch is most commonly introduced by the following...Read more >Nuxt - Vue.js ExamplesA lightweight Nuxt template to write a Markdown driven website. 24 May 2022. Nuxt Hydration node mismatch issue reproduction.Read more >Top Related Medium Post
No results foundTop Related StackOverflow Question
No results foundTroubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.Start FreeTop Related Reddit Thread
No results foundTop Related Hackernoon Post
No results foundTop Related Tweet
No results foundTop Related Dev.to Post
No results foundTop Related Hashnode Post
No results found
Top GitHub Comments
I can confirm the same issue happening for me since bootstrap-vue@2.15.0. And I can also confirm the above fix works, thanks @ashwinkshenoy .
I kinda fixed this issue:
My code Before fix:
My code After fix:
Not sure why the
text
prop onb-dropdown
, is creating the issue. Hope this helps as a workaround till the fix!