xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

'init' is not exported by node_modules\echarts\index.js #183

Open ok-dok opened 5 years ago

ok-dok commented 5 years ago

This error exposed when I used ngx-echarts in angular7 and compiled by rollup. The error messages are follows:

` [!] Error: 'init' is not exported by node_modules\echarts\index.js https://rollupjs.org/guide/en#error-name-is-not-exported-by-module- node_modules\ngx-echarts\fesm5\ngx-echarts.js (3:9)

1: import { of, EMPTY, fromEvent, Observable } from 'rxjs';

2: import { Directive, ElementRef, EventEmitter, Input, NgZone, Output, NgModule } from '@angular/core';

3: import { init } from 'echarts';

4: import { debounceTime, switchMap } from 'rxjs/operators';

Error: 'init' is not exported by node_modules\echarts\index.js at error (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:3766:30) at Module.error (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:14611:9) at handleMissingExport (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:14538:21) at Module.traceVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:14880:17) at ModuleScope.findVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:13582:37) at FunctionScope.ChildScope.findVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:4449:67) at ChildScope.findVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:4449:67) at FunctionScope.ChildScope.findVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:4449:67) at ChildScope.findVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:4449:67) at FunctionScope.ChildScope.findVariable (D:\inspur\workplace\angular-rollup-scafflod\node_modules\rollup\dist\rollup.js:4449:67) `

How can I solve this problem?

Aoudsung commented 3 years ago

Have you solved the problem??