ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead angular angular

ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead


To fix this install the specific typescript version 3.1.6

npm i typescript@3.1.6 --save-dev --save-exact


In my case below command worked for windows. It will install latest required version between 3.1.1 and 3.2.0. Depending on OS use either double or single quotes

npm install typescript@">=3.1.1 <3.2.0" 


First install your targeted version

npm i typescript@3.1.6 --save-dev --save-exact

Then before compiling do

   npm i