caught (in promise) TypeError: Cannot read properties of undefined (reading ‘init‘)

报错caught (in promise) TypeError: Cannot read properties of undefined (reading ‘init’)

解决方案:init报错
查看package.json文件中echarts版本,如果是5.0以上的版本请卸载安装指定版本4.2.1,然后就不会报错了
https://img-home.csdnimg.cn/images/20220524100510.pn
转自:https://blog.csdn.net/qq_45223074/article/details/112860423