vue error:
vue.esm.js?a026:628 [Vue warn]: Error in mounted hook: “TypeError: Cannot read properties of undefined (reading ‘$on’)”
Solution: Add the following codes in main.js
// The event Bus is used for communication between unrelated components.
Vue.prototype.$bus = new Vue()
Read More:
- [Solved] Vue Project Error: “TypeError: Cannot read properties of undefined (reading ‘init‘)“
- [Solved] Element form method resetfields() error: vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read properties of undefined (reading ‘indexOf’)
- [Solved] Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘resetFields‘)“
- [Solved] react Chrome Browser Error: Uncaught TypeError: Cannot read properties of undefined (reading ‘forEach‘)
- Vue form validate error: Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘indexOf‘)
- [Solved] Element form method Error: TypeError: Cannot read properties of undefined (reading ‘resetFields’)
- Vue Error: error in mounted hook: TypeError: invalid src type
- [Solved] vue watch Error: Error in callback for watcher “xxx“: “TypeError: Cannot read properties of undefined …
- [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined
- [Solved] Cannot read properties of undefined (reading ‘propsData‘)“
- [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined
- [Solved] Echarts Error: TypeError: Cannot read properties of null (reading getAttribute )
- [Solved] electron Use remote Error: Cannot read properties of undefined (reading ‘BrowserWindow‘)
- [Solved] Vue Error: Syntax Error: TypeError: Cannot set properties of undefined (setting ‘XXX’)
- Error in nextTick: “TypeError: Cannot set properties of undefined (setting ‘checked‘)“
- [Solved] Vue3 Import element UI error: Uncaught TypeError: Cannot read properties of underfined…
- [Solved] Binding onclick event in JS: for loop: error uncaught typeerror: cannot set properties of undefined (setting ‘classname’)
- [Solved] Vue Error: TypeError: Cannot read property ‘end‘ of undefined
- [Solved] vue.esm.js?efeb:591 [Vue warn]: Error in event handler for “click“: “TypeError: Cannot read property
- [Vue warn]Error in mounted hook: “Error: please transfer a valid prop path to form item“