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.

echarts is not defined

See original GitHub issue

echarts应该是加载了,但是还是弹出提示说 echarts is not defined,能帮忙看下是什么问题吗? 用的是asp.net core + angular +webpack

webpack 里已经加了 new webpack.ProvidePlugin({ ...,echarts: 'echarts' }),

第一行是已经加载的echarts信息console.log(echarts); 第二行是调用<div echarts [options]="options" style="height:150px"></div>显示的错误信息 qq 20180105123741

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
helloneobergcommented, Feb 2, 2018

好不容易终于解决问题. 我把 “new webpack.ProvidePlugin({ echarts: ‘echarts’ })” 加到 “webpack.config.js”, 放在第一条线。 希望对用asp.net core 2.0 + angular 4 + webpack 的朋友们有帮助。

webpack_config_js

1reaction
txd331commented, Mar 15, 2018

我今天刚遇到这个问题,解决方案跟楼上的相似。我用的angular-cli。.angular-cli.json文件里加入如下 { …, “scripts”: [ “…/node_modules/echarts/dist/echarts.min.js”, “…/node_modules/echarts/dist/extension/bmap.min.js”, … ], … }

Read more comments on GitHub >

github_iconTop Results From Across the Web

eCharts import does not work. Fails with _DEV__ is not defined
I have import echarts as below and it works import * as echarts from 'echarts/dist/echarts.js';.
Read more >
Echarts is not defined in jsp file · Issue #11573 - GitHub
The issue I am trying to point out is, that browser loads the echarts.min.js file before there is a call to echarts.init() method....
Read more >
echarts is not defined - Code Examples & Solutions For This ...
echarts is not defined ... <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.1.0/echarts-en.common.min.js"> ... Tags: defined echarts typescript.
Read more >
Import ECharts - Basics - The Apache Software Foundation!
There are two approaches to using ECharts as a package. The simplest approach is to make all functionality immediately available by importing from...
Read more >
Documentation - Apache ECharts
Creates an ECharts instance, and returns an echartsInstance. You shall not initialize multiple ECharts instances on a single container. ... Instance container, ...
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