Uncaught (in promise) TypeError: sub is not a function at eval (vuex.esm.js?2f62:422:1)
时间: 2023-09-24 13:12:42 浏览: 245
引用\[1\]:Uncaught TypeError: Object(...) is not a function at resetStoreState (vuex.esm-browser.js?5502:140:1) at new Store (vuex.esm-browser.js?5502:932:1) at eval (index.js?4360:48:1) at Module../src/store/index.js (index.js:1115:1) at __webpack_require__ (index.js:849:30) at fn (index.js:151:20) at eval (main.js:13:64) at Module../src/main.js (index.js:1103:1) at __webpack_require__ (index.js:849:30) at fn (index.js:151:20) vuex源码报错 google浏览器源代码。\[1\]这个错误是在Vuex源码中的resetStoreState函数中发生的,可能是因为在调用该函数时,传入的参数不是一个函数。具体的错误信息显示在浏览器的控制台中,可以通过查看源代码来定位问题所在。
引用\[2\]:TypeError: sub is not a function at eval (vuex.esm.js?2f62:422:1) at Array.forEach (<anonymous>) at Store.dispatch (vuex.esm.js?2f62:422:1) at Store.boundDispatch \[as dispatch\] (vuex.esm.js?2f62:332:1) at eval (list.vue?51fc:432:1) 这个错误是在调用Store.dispatch函数时发生的,可能是因为传入的参数sub不是一个函数。具体的错误信息显示在浏览器的控制台中,可以通过查看源代码来定位问题所在。
引用\[3\]:TypeError: sub is not a function at vuex.esm.js:422:1 at Array.forEach (<anonymous>) at Store.dispatch (vuex.esm.js:422:1) at Store.boundDispatch \[as dispatch\] (vuex.esm.js:332:1) at permissionsControl (permission.js:56:1) at permission.js:131:1 at iterator (vue-router.esm.js:1943:1) at step (vue-router.esm.js:1717:1) at step (vue-router.esm.js:1721:1) at runQueue (vue-router.esm.js:1725:1) 这个错误也是在调用Store.dispatch函数时发生的,同样是因为传入的参数sub不是一个函数。具体的错误信息显示在浏览器的控制台中,可以通过查看源代码来定位问题所在。
问题:Uncaught (in promise) TypeError: sub is not a function at eval (vuex.esm.js?2f62:422:1)
回答: 这个错误是在Promise中发生的,可能是因为在Promise的回调函数中调用了一个名为sub的函数,但是该函数并不存在或者不是一个函数。具体的错误信息显示在浏览器的控制台中,可以通过查看源代码来定位问题所在。
#### 引用[.reference_title]
- *1* [Uncaught TypeError: Object(...) is not a function at resetStoreState (vuex.esm-browser.js?5502:1](https://blog.csdn.net/qq_41664159/article/details/123033963)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [vue2.x项目报错 vuex.esm.js sub is not function](https://blog.csdn.net/weixin_44786530/article/details/127316151)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [解决vue引发的报错-sub is not a function at vuex.esm.js:422:1跳转不了路由的问题](https://blog.csdn.net/imqdcn/article/details/126297459)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文