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

Angular 10 build still broken (issue #250 is not resolved) #256

Closed jenswet closed 4 years ago

jenswet commented 4 years ago

Unfortunately the Angular 10 build is still broken with v5.1.1

ng-serve gives two errors:

Error: Tried to write /Users/jens/EL/EL-Sensor/webapp/node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, /Users/jens/EL/EL-Sensor/webapp/node_modules/ngx-echarts/lib/ngx-echarts.directive.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write /Users/jens/EL/EL-Sensor/webapp/node_modules/ngx-echarts/lib/ngx-echarts.module.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, /Users/jens/EL/EL-Sensor/webapp/node_modules/ngx-echarts/lib/ngx-echarts.module.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write /Users/jens/EL/EL-Sensor/webapp/node_modules/ngx-echarts/ngx-echarts.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, /Users/jens/EL/EL-Sensor/webapp/node_modules/ngx-echarts/ngx-echarts.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.

After finishing the compile process following error occurs during ng serve and ng build --prod:

ERROR in node_modules/ngx-echarts/lib/ngx-echarts.module.d.ts:3:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

This likely means that the library (ngx-echarts) which declares NgxEchartsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

3 export declare class NgxEchartsModule {
                       ~~~~~~~~~~~~~~~~

The problem likely is that lib/ngx-echarts.module.d.ts.__ivy_ngcc_bak is still shipped in the new npm release.

@xieziyu It would be great if you can push another release without these two ngcc_bak files soon. Thanks a lot!

Please check https://github.com/xieziyu/ngx-echarts/issues/250#issuecomment-663572213 for more information. @gkalpak can probably help if there are further questions.

xieziyu commented 4 years ago

Sorry about the mistake, ivy files should not be shipped with the package. Thanks for your notification!

gkalpak commented 4 years ago

FWIW, I can confirm that v5.1.2 fixed our tests: angular/ngcc-validation#1606 Thx, @xieziyu :+1:

jenswet commented 4 years ago

v5.1.2 fixed the build for me. Thanks a lot @xieziyu!