Angular 12 update - The Angular Compiler requires TypeScript

Viewed 3758

I have updated my project to the latest angular version. After updating with "ng update" I receive the message that everything is up to date. (The last step in my process. The required packages are already updated)

Nice, but when I serve the project I get the following error:

Error: The Angular Compiler requires TypeScript >=4.2.3 and <4.3.0 but 4.3.2 was found instead. 

I already tried: npm install typescript@4.3.0 but that version does not exist. I prefer not to downgrade. I trying to keep my projects up to date.

How can I fix this.

2 Answers

Angular 12 only supports Typescript 4.2. You have to modify your package.json like this.

    "typescript": "~4.2.3"

And re-run npm install.

Related