Buidling the application after having upgraded dependcies to Angular 9 (and having performed necessary code changes) throws an error:
Compiling @angular/animations : es2015 as esm2015 Compiling @angular/animations : es2015 as esm2015 Compiling @angular/core : es2015 as esm2015 Compiling @angular/core : es2015 as esm2015
Compiling @angular/core : es2015 as esm2015
Error: Error on worker #5: TypeError: Cannot read property 'fileName' of null
It then goes on to throw the below error:
Compiling @angular/core : es2015 as esm2015 Compiling @angular/compiler/testing : es2015 as esm2015 Compiling @angular/core : es2015 as esm2015
Error: Tried to write node_modules/@angular/core/core.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, node_modules/@angular/core/core.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.
Compiling @angular/core : es2015 as esm2015 An unhandled exception occurred: NGCC failed.
This problem (NGCC failed) was encountered by me and my colleague developer on our localhost machines.
It would be important to remark that the dev and prod machines were running well.
In order to solve this problem we've followed the next steps:
I wish this helps you and other people in situations like this.