Failed to execute 'insertBefore' when navigating to a non-layouted page
Environment
- Operating System:
Darwin - Node Version:
v16.17.0 - Nuxt Version:
3.0.0-rc.8 - Package Manager:
[email protected] - Builder:
vite - User Config:
srcDir,css,vite,runtimeConfig - Runtime Modules:
- - Build Modules:
-
Reproduction
Here's a very simple reproduction: https://stackblitz.com/edit/nuxt-starter-ahwquy Just go here and open the developers tools to see the error. https://nuxt-starter-ahwquy--3000.local.webcontainer.io/
To see the bug, go on the second page, there is no error.
However, navigating from second to index create an error.
Describe the bug
When navigating from a page using a layout to an other page who's not using a layout, an Uncaught DOMException occurs.
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
Same as #3141
Same as #3141
Yes, I red this issue. However, I think this is not the same problem.
Mine is appearing when a layout is disabled on a page. Not when navigating "too fast"
I'm getting this same error, but in the opposite direction. (when going from a 'disabled' layout page, to one with a layout enabled)
but I was able to make the error go away in the same way as one of the workarounds in #3141, namely:
// app.vue
<NuxtLayout>
<NuxtPage :key="$route.fullPath" />
</NuxtLayout>
So this could possibly work for you?
Seems like fixed in rc-12 release. This can be closed @danielroe