Buidling the application after having upgraded dependcies to Angular 9 (and having performed necessary code changes) throws an error:
Compiling @ang
Well in my case I was trying to run an angular project of an older version with a newer version of node. I did this:
Removes all the existing nodule modules.
rm -rf node_modules
update node js to latest
npm update
npm install
updates the angular project version to the latest
ng update @angular/core
updates the project cli to the latest
ng update @angular/cli
Now start the project
ng-serve