vue-fragment
vue-fragment copied to clipboard
Bug using vue-fragment with routes
Hello I got a bug when I use vue-fragment. In my first attemp my navigation not work and have no erros in console, follow my project commit in this moment:
https://github.com/juniorjrjl/weblib-front/tree/c47324c188e4977960c321e493cebadf6301b18b
After make changes in file: weblib-front/src/router/index.js, I removed ".default" from my components:
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/pages/Home/Home.vue'
import NewUser from '@/pages/NewUser/NewUser.vue'
Vue.use(VueRouter)
const routes = [
{ path: '/', component: Home },
{ path: '/NewUser', component: NewUser }
]
export default new VueRouter({
routes
})
After this I get this error and solved it after remove Fragment from my components
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in nextTick:
"NotFoundError: Failed to execute 'insertBefore' on 'Node': The node
before which the new node is to be inserted is not a child of this
node."
vue.runtime.esm.js?2b0e:1888 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.
at HTMLBodyElement.n.insertBefore (webpack-
internal:///./node_modules/vue-fragment/dist/vue-
fragment.esm.js:5:1609)
at HTMLDivElement.e.insertBefore (webpack-
internal:///./node_modules/vue-fragment/dist/vue-
fragment.esm.js:5:1293)
at Object.insertBefore (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:5699:14)
at insert (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:6029:19)
at createComponent (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:5976:9)
at createElm (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:5915:9)
at updateChildren (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:6206:11)
at patchVnode (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:6309:29)
at VueComponent.patch [as __patch__] (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:6472:9)
at VueComponent.Vue._update (webpack-
internal:///./node_modules/vue/dist/vue.runtime.esm.js:3942:19)
Hello juniorjrjl,
Could you please elaborate on where exactly you use the vue-fragment package because it seems like the git project you attached does not include the vue-fragment package.
Sorry I thought the link direct a commit with bug, now I created a new repository with bug, follow the link:
https://github.com/juniorjrjl/vue-fragment-bug