Incubator-echarts: ReferenceError: __DEV__ is not defined

Created on 9 Nov 2017  ·  5Comments  ·  Source: apache/incubator-echarts

One-line summary [问题简述]

__DEV__ 未定义 报错
图表不展示

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.5.3
  • Browser version [浏览器类型和版本]: Chrome 62.0.3202.62(正式版本) (64 位)
  • OS Version [操作系统类型和版本]: macOS 10.12.5 (16F73)

Node Version: v8.4.0

npm Version: 5.3.0

Expected behaviour [期望结果]

ECharts option [ECharts配置项]


option = {

}

Other comments [其他信息]


Most helpful comment

package.json 里面写死这2个库的版本,可以暂时解决

"echarts": "3.7.2",
"zrender": "3.6.3",

All 5 comments

package.json 里面写死这2个库的版本,可以暂时解决

"echarts": "3.7.2",
"zrender": "3.6.3",

写死了各种找不到模块啊...

ERROR in ./node_modules/echarts/src/util/graphic.js
Module not found: Error: Can't resolve 'zrender/graphic/shape/BezierCurve' in 'F:\test\node_modules\echarts\src\util'
 @ ./node_modules/echarts/src/util/graphic.js 43:26-70

我也遇到同样的问题,望解决啊,急。这个问题是什么原因导致的呢

我们在新发布的 3.8.2 中将 lib 下的重新转译成了 CommonJS 格式并且去掉了 __DEV__,应该解决了大家构建的兼容问题。非常抱歉新版本的模块系统给大家造成了这么大的麻烦。

3.8.3也遇到这个问题了,我用vue2引入echarts就会报这个错,找了好久才发现是echarts的问题.
image

Was this page helpful?
0 / 5 - 0 ratings