Typescript: ERROR in The Angular Compiler requires TypeScript >=3.6.4 and <3.9.0 but 3.9.3 was found instead

Created on 23 May 2020  路  5Comments  路  Source: microsoft/TypeScript

Description

I just upgraded to Angular/cli 9.1.7 and some other packages also using ng update

Old packags.json
```
"dependencies": {
"@angular/animations": "^9.1.7",
"@angular/common": "^9.1.7",
"@angular/compiler": "^9.1.7",
"@angular/core": "^9.1.7",
"@angular/forms": "^9.1.7",
"@angular/platform-browser": "^9.1.7",
"@angular/platform-browser-dynamic": "^9.1.7",
"@angular/router": "^9.1.7",
"moment": "^2.25.3",
},
"devDependencies": {
"@angular/cli": "^9.1.6",
"@angular/compiler-cli": "^9.1.7",
"@angular/language-service": "^9.1.7",
"@types/node": "^12.12.39",
"karma": "^5.0.8",
"typescript": "^3.7.5"
}

new package.json

"dependencies": {
"@angular/animations": "^9.1.9",
"@angular/common": "^9.1.9",
"@angular/compiler": "^9.1.9",
"@angular/core": "^9.1.9",
"@angular/forms": "^9.1.9",
"@angular/platform-browser": "^9.1.9",
"@angular/platform-browser-dynamic": "^9.1.9",
"@angular/router": "^9.1.9",
"moment": "^2.26.0",
},
"devDependencies": {
"@angular/cli": "^9.1.7",
"@angular/compiler-cli": "^9.1.9",
"@angular/language-service": "^9.1.9",
"@types/node": "^12.12.42",
"karma": "^5.0.9",
"typescript": "^3.9.3"
}
```

Now when I run ng s, I get an error,
ERROR in The Angular Compiler requires TypeScript >=3.6.4 and <3.9.0 but 3.9.3 was found instead

Why did Angular update me to Typescript 3.9.3 if it's not supported?
Error SS
TypescriptError

Most helpful comment

umm...
just, [email protected] is supported until [email protected]
and, angular@10 will be supported [email protected]

npm i [email protected]

All 5 comments

umm...
just, [email protected] is supported until [email protected]
and, angular@10 will be supported [email protected]

npm i [email protected]

@eun-choi Thanks for the info. I have installed the lower version and it solved the problem, well that i wanted to know why it was showing me outdated if it is not supposed to install in [email protected].

This issue is completely unrelated to TypeScript. Perhaps you should file an issue in the Angular repository. It's the Angular tool that updated your dependencies, and it's the Angular tool that reports the error on the TypeScript version.

Hi @MartinJohns yeah i can do that thanks.

For those who are facing a similar issue, please refer to my answer on stackoverflow :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

siddjain picture siddjain  路  3Comments

zhuravlikjb picture zhuravlikjb  路  3Comments

blendsdk picture blendsdk  路  3Comments

bgrieder picture bgrieder  路  3Comments

wmaurer picture wmaurer  路  3Comments