echarts: Cannot read properties of undefined (reading 'regions')

Version

5.3.2

Link to Minimal Reproduction

No response

Steps to Reproduce

echarts5.3.2版本绘制中国地图

Current Behavior

本地运行无 打包之后报错Cannot read properties of undefined (reading ‘regions’) 地图不展示

Expected Behavior

地图正常展示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

“echarts”: “^5.4.2”

这个问题刚刚遇到了,解决办法将引入地图文件的方式改一下。 将 import “echarts/map/js/china.js” 改为 require(“echarts/map/js/china.js”) 生产环境就不会报错。

Has this problem been solved ? I also encountered this problem

same problem !!! echarts 4.9.3=>5.3.2 handdened import ‘echarts/extension/bmap/bmap’