Buidling the application after having upgraded dependcies to Angular 9 (and having performed necessary code changes) throws an error:
Compiling @ang
Check your node.js version with node -v. And check if Angular 9 is compatible with it. Updating node.js to the latest LTS version (12.8.1) worked for me. I did this with nvm (node version manager). Found a good instruction here.
node -v