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.

Click on NuxtLink renders empty page with error: The node before which the new node is to be inserted is not a child of this node.

See original GitHub issue

Environment

  • Operating System: Darwin
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-27470397.9ebea90
  • Package Manager: yarn@1.22.17
  • Builder: vite
  • User Config: modules, buildModules, dev, build, css, meta, app, publicRuntimeConfig, privateRuntimeConfig
  • Runtime Modules: @nuxtjs/sitemap@2.4.0
  • Build Modules: nuxt-purgecss@1.0.0, ~/modules/pages

Reproduction

Page pages/typo.vue

<template>
    <ContainerFluid>
        <article class="mt-10 mb-10">
            <h1>Headings</h1>
            <h1>H1 title</h1>
            <h2>H2 title</h2>
            <h3>H3 title</h3>
            <h4>H4 title</h4>
            <h5>H5 title</h5>
        </article>
    </ContainerFluid>
</template>

Link

<NuxtLink to="/typo">
     Typo
</NuxtLink>

Describe the bug

Everytime I click on NuxtLink, Nuxt renders empty page. Node <div id="__nuxt"></div> is always empty.

Randomly there is en error in the console:

Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
tsulatsitamimcommented, Mar 30, 2022

I can confirm that I have multiple root in layout and page. wrapping into single root element in page solve the problem. thank you.

0reactions
tiborpinocommented, Apr 13, 2022

I can confirm that I have multiple root in layout and page. wrapping into single root element in page solve the problem. thank you.

Same for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue router.push gives an error 'Node.insertBefore
push it gives me an error in the console DOMException: Node.insertBefore: Child to insert before is not a child of this node ....
Read more >
The router Property - Nuxt
The router property. The router property lets you customize Nuxt router. (vue-router ). base. Type: String; Default: '/'. The base URL of the...
Read more >
Nuxt.js for Busy Developers - CODE Magazine
The routing middleware that can be run before rendering a page or group of pages under one layout. The server-side Node.js middleware that...
Read more >
Troubleshooting nested pages in Nuxt.js - LogRocket Blog
In simple terms, a nested page is a page within a page. We use nested pages in situations when we need to add...
Read more >
Toast | Components - BootstrapVue
The <b-toast> component can be placed anywhere in your custom component or app, and does not render an element (they render a comment...
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