Open hijamoya opened 6 years ago
I am having the same issue, however it works for me when I was using ng serve --aot. Note that I used import {init} from echarts; and NgxEchartsModule.forRoot({echarts: init}) in my module (because otherwise it will throw "Cannot read property 'init' of null" error)
Note that I used import {init} from echarts; and NgxEchartsModule.forRoot({echarts: init})
This solved my problem! I did, however, write it like this instead, since I'm using version 5.0.0:
import * as echarts from "echarts";
NgxEchartsModule.forRoot({
echarts: { init: echarts.init }
})
Edit: my solution turned out not to work properly with typing :(
Have the same issue
Same issue
Alright, here's how I fixed it:
npm uninstall ngx-echarts
npm uninstall echarts
npm install ngx-echarts@4.2.2
npm install echarts@4.2.1
In the module where I use ngx-echarts, I removed the forRoot part, and simply imported the module like any other:
@NgModule({
imports: [
NgxEchartsModule,
],
At this point another error occured, but I remember the fix was rather simple:
npm install @angular-devkit/build-angular@0.803.20
Hope this helps someone.
Yeah, downgrading seems to be the only solution for now. I do, however, use the latest version of echarts, i.e. 4.8.0. Works fine so far.
Can not build production version after update to v4.0.0: