Getting error after imported in Angular 7

I got the same error. If i update typescript to 3.6.4, the error is gone, but I cannot compile anymore:

The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.6.4 was found instead.

Installing OffscreenCanvas and Webgl2 did not help. Need a solution for this! I cannot build for production