question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuxt tree missmatch

See original GitHub issue

Describe 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>&lt;b-card-body&gt;</samp> section. Notice the
      lack of padding between the card's border and this gray <samp>&lt;div&gt;</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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubornasscommented, Aug 20, 2020

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 .

1reaction
ashwinkshenoycommented, Aug 5, 2020

I kinda fixed this issue:

My code Before fix:

<b-dropdown id="dropdown-1" class="header-menu__dropdown" text="Features">
    <b-dropdown-item to="/social-media-campaigns">Social Media</b-dropdown-item>
</b-dropdown>

My code After fix:

<b-dropdown id="dropdown-1" class="header-menu__dropdown">
    <template v-slot:button-content>
        Features
    </template>
   <b-dropdown-item to="/social-media-campaigns">Social Media</b-dropdown-item>
</b-dropdown>

Not sure why the text prop on b-dropdown, is creating the issue. Hope this helps as a workaround till the fix!

Read more comments on GitHub >

github_iconTop 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 - YouTube
The 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.js
Nuxt 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 Examples
A lightweight Nuxt template to write a Markdown driven website. 24 May 2022. Nuxt Hydration node mismatch issue reproduction.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found