Class constructor cannot be invoked without 'new' after upgrading to Angular 10

Viewed 1815

I've just upgraded my app from Angular 9 to Angular 10 using the official procedure (with ng update) and after I did it, I got plenty of errors like:

ERROR Error: Uncaught (in promise): TypeError: Class constructor FormControl cannot be invoked without 'new'

1 Answers

I had the same issue. Could solve it by setting the target in tsconfig.json to es2015. Among other possible side effects, this means no more support for IE11. Hope this helps!

    "compilerOptions": {
        "target": "es2015",
    },
Related