2017-11-30 10 views
2

프런트 엔드 용 Vue.js v2.5.1을 사용하여 웹 응용 프로그램을 빌드했습니다. 응용 프로그램은 일반적으로 잘 작동하지만 문제가 발생하면 던져진 오류 메시지는 내 코드의 일부가 아닌 vue.js 코드 자체를 참조합니다 (내 템플릿에서 무언가를 가정 함). 문제.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를 사용해 보았지만 모든 dev 도구는 모든 Vue 구성 요소의 목록입니다. 이벤트 창은 언제나 비어 있습니다. 더 나쁜 것은이 오류가 발생하면 전체 응용 프로그램이 멈추는 것입니다 (하지만 vue 데이터는 모두 정상적으로 보입니다).

답변

0

상태 변경이 완료되지 않았을 때 돌연변이 내부에서 경로 변경을 밀어 내서이 오류를 발견했습니다. 줄 바꾸기를 푸는 경우 Vue.nextTick()가 해결되었습니다.