Problem scenario
In Vue project Introducing echorts as a component
The screenshot of error reporting is as follows
Solution:
Originally, document.getelementbyid was used according to the official website
Changed to
Read More:
- [Solved] Vue echarts Error: Initialize failed: invalid dom.
- Vue: initialize failed: invalid DOM [How to Solve]
- [Solved] Echarts Error: Uncaught (in promise) Error: Initialize failed: invalid dom.
- [Solved] echarts Draw Errror: echarts-d9fd185e.js:31447 Uncaught (in promise) Error: Initialize failed: invalid dom.
- [Solved] echarts Error: Error in callback for watcher “chartSource“: “Error: Initialize failed: invalid dom.“
- How to Use DOM to operate CSS
- [Chrome]: DevTools failed to load source map… (How to Solve)
- How to Solve Error: [Vue warn]: Missing required prop: “value”
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …
- The addition, deletion and modification of DOM in JS Foundation
- React error boundary (What You Should Know & How to Solve)
- How to Solve Props value transfer International Language error
- How to Solve Vue3 Import lodash error
- Vue: How to Solve Eslint error
- How to Solve Vue cli syntax Close Error
- How to Solve Vue loading 3D model Error
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- How to Solve OffsetParent is not set error
- How to Solve Vscode save Vue file eslint error
- How to Solve Phantomjs prebuilt error