Buidling the application after having upgraded dependcies to Angular 9 (and having performed necessary code changes) throws an error:
Compiling @ang
I had this issue when I ran ionic build while the project built just fine with my colleagues. So we ran ng -v to compare our packages. Turns out I had higher versions of @angular-devkit/build-angular, @angular-devkit/build-optimizer and @angular-devkit/build-webpack , each of them was version 0.1001.2 - our project was running with 0.901.8.
So I ran npm uninstall @angular-devkit/build-angular 0.1001.2 to uninstall it, and npm install @angular-devkit/build-angular 0.901.8 to downgrade. On running ng -v again, the other 2 had downgraded as well.
Finally, ionic build was a success! We lived happily thereafter, till we run into different problems.Working packages for our project