参考的是这篇博主的文章

https://blog.csdn.net/weixin_44874618/article/details/110647652

去看了下我自己的echarts的版本号

npm ls echarts  //查看echarts的版本

一看确实是5.0的
或者在page.json文件查看(这是重装好的,仅做演示)

"dependencies": {
"axios": "^0.19.2",
"echarts": "^4.9.0",
"element-ui": "^2.13.2",
"html2canvas": "^1.0.0-rc.7",
"qrcodejs2": "^0.0.2",
"vue": "^2.5.2",
"vue-axios": "^2.1.5",
"vue-qr": "^2.2.1",
"vue-router": "^3.0.1"
},


按照这篇博主说的,卸载了重装 echarts

npm uninstall echarts //卸载


重装

npm install echarts@4.9.0
npm fund
npm run dev

 

这样就好了

vue中引入echarts  报错“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

 

 vue中引入echarts  报错“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

 

 效果如下

vue中引入echarts  报错“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

 

相关文章: