您的位置: 首页 > 文章 > vue echarts引入外部资源js文件报错Cannot read property ‘echarts’ of undefined vue echarts引入外部资源js文件报错Cannot read property ‘echarts’ of undefined 分类: 文章 • 2023-03-07 08:53:57 vue echarts引入外部资源js文件报错Cannot read property ‘echarts’ of undefined 问题点 在vue中引入echarts后,我引入的是山东省最新的js文件,本地开发环境没事,在vue项目打包后部署后报Cannot read property ‘echarts’ of undefined错误。 图片示例 解决方案 比较笨的一种方案,把修改后的文件替换到node_modules下的echarts下面的map下面的js文件的province下的shandong.js文件然后因为这个文件问题就得到了解决重点是引入node_modules里面的包