"export 'default' (imported as 'echarts') was not found in 'echarts'
查看安裝的是echarts 5.0
頁(yè)面查看報(bào)"TypeError: echarts.init is not a function"錯(cuò)誤,
但是console.log()出來(lái)的echarts.init就是function。
經(jīng)測(cè)試司草,echarts for react不支持echarts最新版本5.0.0因此引入4.9.0
最后發(fā)現(xiàn)只能執(zhí)行:
npm install echarts@4.9.0
才可以變更為4.9没陡。使用就沒(méi)有問(wèn)題了