导入失败时,新建一个.d.ts文件,内容可以为空也可以写内容,随便举个例子
declare module 'echarts' { const echarts: any export default echarts }
或者试试另一解决方案如下链接
别人的解决方案