我已经使用Vue.js v2.5.1为前端构建了一个web应用程序。这个应用程序通常工作得很好,但是当出现问题时,抛出的错误消息只会引用vue.js代码本身,而不是我的代码部分(我假设在我的模板中有一些内容),而这些部分无疑是问题的真正根源。
下面是一个示例:
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."
warn @ vue.js?v=1:491
logError @ vue.js?v=1:600
globalHandleError @ vue.js?v=1:595
handleError @ vue.js?v=1:584
(anonymous) @ vue.js?v=1:735
nextTickHandler @ vue.js?v=1:685
vue.js?v=1:604 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 Object.insertBefore (https://mywebsite.com/js/vendor/vue.js?v=1:5138:20)
at updateChildren (https://mywebsite.com/js/vendor/vue.js?v=1:5628:48)
at patchVnode (https://mywebsite.com/js/vendor/vue.js?v=1:5695:41)
at updateChildren (https://mywebsite.com/js/vendor/vue.js?v=1:5592:21)
at patchVnode (https://mywebsite.com/js/vendor/vue.js?v=1:5695:41)
at updateChildren (https://mywebsite.com/js/vendor/vue.js?v=1:5592:21)
at patchVnode (https://mywebsite.com/js/vendor/vue.js?v=1:5695:41)
at updateChildren (https://mywebsite.com/js/vendor/vue.js?v=1:5592:21)
at patchVnode (https://mywebsite.com/js/vendor/vue.js?v=1:5695:41)
at updateChildren (https://mywebsite.com/js/vendor/vue.js?v=1:5592:21)我怎样才能找到问题的根源呢?我已经尝试使用Vue devtools,但所有的开发工具显示的是我的所有Vue组件的列表,事件窗格总是空的,更糟糕的是,当这个错误发生时,整个应用程序都会停止(但vue数据看起来仍然正常)。( do.Whats )
https://stackoverflow.com/questions/47581820
复制相似问题