在我正在开发的vue.js应用程序中,我突然在Chrome检查器中遇到一个错误:
Uncaught TypeError: c.querySelectorAll is not a function
它总是停止执行。当我可以继续并且似乎不会引起任何其他问题时。但如果每次点击后都要按继续,我就无法这样工作。
在调试器中,我可以看到c
是一个变量,引用DOM中的注释。它影响不同的注释。但是所有注释都有一个共同点,它们是由vue.js插入的动态元素的占位符。
在堆栈跟踪中,我的代码几乎没有(请参见下面的示例)。
(anonymous) (content_script_bundle.js:16)
childList (async)
appendChild (vue.runtime.esm.js?2b0e:5711)
insert (vue.runtime.esm.js?2b0e:6036)
createComponent (vue.runtime.esm.js?2b0e:5980)
createElm (vue.runtime.esm.js?2b0e:5919)
addVnodes (vue.runtime.esm.js?2b0e:6100)
updateChildren (vue.runtime.esm.js?2b0e:6227)
patchVnode (vue.runtime.esm.js?2b0e:6313)
patch (vue.runtime.esm.js?2b0e:6476)
Vue._update (vue.runtime.esm.js?2b0e:3942)
updateComponent (vue.runtime.esm.js?2b0e:4060)
get (vue.runtime.esm.js?2b0e:4473)
run (vue.runtime.esm.js?2b0e:4548)
flushSchedulerQueue (vue.runtime.esm.js?2b0e:4304)
(anonymous) (vue.runtime.esm.js?2b0e:1980)
flushCallbacks (vue.runtime.esm.js?2b0e:1906)
Promise.then (async)
timerFunc (vue.runtime.esm.js?2b0e:1933)
nextTick (vue.runtime.esm.js?2b0e:1990)
queueWatcher (vue.runtime.esm.js?2b0e:4396)
update (vue.runtime.esm.js?2b0e:4538)
notify (vue.runtime.esm.js?2b0e:730)
reactiveSetter (vue.runtime.esm.js?2b0e:1055)
(anonymous) (Workspace.vue?7337:142)
Promise.then (async)
(anonymous) (Workspace.vue?7337:139)
loadPanel (Workspace.vue?7337:138)
mounted (Workspace.vue?7337:112)
invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
callHook (vue.runtime.esm.js?2b0e:4213)
insert (vue.runtime.esm.js?2b0e:3139)
invokeInsertHook (vue.runtime.esm.js?2b0e:6340)
patch (vue.runtime.esm.js?2b0e:6559)
Vue._update (vue.runtime.esm.js?2b0e:3942)
updateComponent (vue.runtime.esm.js?2b0e:4060)
get (vue.runtime.esm.js?2b0e:4473)
run (vue.runtime.esm.js?2b0e:4548)
flushSchedulerQueue (vue.runtime.esm.js?2b0e:4304)
(anonymous) (vue.runtime.esm.js?2b0e:1980)
flushCallbacks (vue.runtime.esm.js?2b0e:1906)
Promise.then (async)
timerFunc (vue.runtime.esm.js?2b0e:1933)
nextTick (vue.runtime.esm.js?2b0e:1990)
queueWatcher (vue.runtime.esm.js?2b0e:4396)
update (vue.runtime.esm.js?2b0e:4538)
notify (vue.runtime.esm.js?2b0e:730)
reactiveSetter (vue.runtime.esm.js?2b0e:1055)
(anonymous) (vue-router.esm.js?8c4f:2555)
(anonymous) (vue-router.esm.js?8c4f:2554)
updateRoute (vue-router.esm.js?8c4f:2013)
(anonymous) (vue-router.esm.js?8c4f:1891)
(anonymous) (vue-router.esm.js?8c4f:2000)
step (vue-router.esm.js?8c4f:1730)
step (vue-router.esm.js?8c4f:1737)
runQueue (vue-router.esm.js?8c4f:1741)
(anonymous) (vue-router.esm.js?8c4f:1995)
step (vue-router.esm.js?8c4f:1730)
(anonymous) (vue-router.esm.js?8c4f:1734)
(anonymous) (vue-router.esm.js?8c4f:1980)
(anonymous) (vue-router.esm.js?8c4f:1808)
iterator (vue-router.esm.js?8c4f:1959)
step (vue-router.esm.js?8c4f:1733)
step (vue-router.esm.js?8c4f:1737)
step (vue-router.esm.js?8c4f:1737)
runQueue (vue-router.esm.js?8c4f:1741)
confirmTransition (vue-router.esm.js?8c4f:1988)
transitionTo (vue-router.esm.js?8c4f:1890)
push (vue-router.esm.js?8c4f:2200)
push (vue-router.esm.js?8c4f:2581)
handler (vue-router.esm.js?8c4f:458)
invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
invoker (vue.runtime.esm.js?2b0e:2179)
original._wrapper (vue.runtime.esm.js?2b0e:6911)
是什么原因导致的?我该如何解决?这是否与最近的vue.js更新有关?