Buidling the application after having upgraded dependcies to Angular 9 (and having performed necessary code changes) throws an error:
Compiling @ang
I had a similar problem,
in my case updating NodeJS to new version helped.