question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

__DEV__ is not defined

See original GitHub issue

One-line summary [问题简述]

vue项目 webpack 引入 echarts 第一次进如没有问题 刷新就会报错500 显示__DEV__ not defined image

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.0以上版本
  • Browser version [浏览器类型和版本]:chrome Safari
  • OS Version [操作系统类型和版本]: Mac 10

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
color: colors,
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {
                            type: 'cross'
                        }
                    },
                    grid: {
                        right: '20%'
                    },
                    toolbox: {
                        feature: {
                            dataView: {show: false, readOnly: true},
                            saveAsImage: {show: true}
                        }
                    },
                    legend: {
                        data:['打印数量','扫码数量','扫码率']
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisTick: {
                                alignWithLabel: true
                            },
                            data: this.xAxisdata
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            name: '数量',
                            position: 'right',
                            axisLine: {
                                lineStyle: {
                                    color: colors[0]
                                }
                            },
                            axisLabel: {
                                // formatter: '{value} ml'
                            }
                        },
                        {
                            type: 'value',
                            name: '扫码率',
                            min: 0,
                            max: 100,
                            position: 'left',
                            axisLine: {
                                lineStyle: {
                                    color: colors[2]
                                }
                            },
                            axisLabel: {
                                formatter: '{value} %'
                            }
                        }
                    ],
                    dataZoom: [
                        {
                            type: 'slider',
                            show: true,
                            start: 1,
                            end: 3
                        }
                    ],
                    series: [
                        {
                            name:'打印数量',
                            type:'bar',
                            data:this.printedata,
                        },
                        {
                            name:'扫码数量',
                            type:'bar',
                            data:this.scandata
                        },
                        {
                            name:'扫码率',
                            type:'line',
                            yAxisIndex: 1,
                            data:this.scanratedata
                        }

                    ]
}

Other comments [其他信息]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
pissangcommented, Nov 10, 2017

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

0reactions
cooooodecommented, Nov 13, 2017
font{
    line-height: 1.7;
}
ul,ol{
    list-style-position: inside;
}

可以升级一下版本试试

    a#ntes-pcmail-signature-default:hover {
        text-decoration: underline;
        color: #199cff;
        cursor: pointer;
    }
    a#ntes-pcmail-signature-default:active {
        text-decoration: underline;
        color: #246fce;
        cursor: pointer;
    }





在2017年11月13日 17:38,raindew2016<notifications@github.com> 写道: 

3.8.0版本的echarts地图都不出来,一直在报TypeError: targetList is undefined的错

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - React Native - __DEV__ is not defined - Stack Overflow
ReferenceError : __DEV__ is not defined. when I ran tests through Jest. Adding moduleNameMapper: { '^react-native$': 'react-native-web', }.
Read more >
`ReferenceError: __DEV__ is not defined` after update to `3.4 ...
On our production bundle (everything works fine on dev mode), we got this message on runtime ReferenceError: __DEV__ is not defined . We...
Read more >
Uncaught ReferenceError: __DEV__ is not defined : r/reactjs
Uncaught ReferenceError : __DEV__ is not defined​​ I'm getting this after I installed the package expo-file-sytem. The error is in the expo-file- ...
Read more >
ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >
End workflow early: $end is not defined - Dev - Pipedream
Hi, I want to end a workflow early but when I call $end('error') I get the error $end is not defined. I printed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found