Reputation: 543
I got this when I was using ngx-echarts. When using versions 4.x.x everything worked fine. After an npm i the application failed to run.
Upvotes: 0
Views: 1165
Reputation: 56
The solution proposed by @Arokia Lijas didn't work for me It generated errors in build --prod
so I found this one :
export function chartModule(): any {
return import('echarts');
}
and in NgModule:
NgxEchartsModule.forRoot({
echarts: chartModule
}),
It did work perfectly for me. Source: https://github.com/xieziyu/ngx-echarts/issues/241#issuecomment-742777787
Upvotes: 1
Reputation: 543
The problem was because of a version update in ngxe-charts. If using versions >5.0 use this in app.module
NgxEchartsModule.forRoot({
echarts: { init: echarts.init }
})
In tsconfig.json in angular compiler options add this too
"enableIvy": false
Upvotes: 3