Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR in The Angular Compiler requires TypeScript >=3.6.4 and <3.8.0 but 3.8.2 was found instead

I ran

ng version

and got the following output:

Angular CLI: 9.0.3
Node: 12.16.1
OS: win32 x64

Angular: 9.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.25
@angular-devkit/build-angular     0.803.25
@angular-devkit/build-optimizer   0.803.25
@angular-devkit/build-webpack     0.803.25
@angular-devkit/core              8.3.25
@angular-devkit/schematics        9.0.3
@angular/cdk                      8.2.3
@angular/cli                      9.0.3
@angular/material                 8.2.3
@ngtools/webpack                  8.3.25
@schematics/angular               9.0.3
@schematics/update                0.900.3
rxjs                              6.5.4
typescript                        3.8.2
webpack                           4.39.2

If I try set the type script lower it complains the project is Angular 9 and can't use that type of type script. Not sure what to do, any help welcomed, thanks.

like image 530
Angel Cloudwalker Avatar asked Feb 21 '20 02:02

Angel Cloudwalker


People also ask

What version of TypeScript does angular 8 use?

Angular 8 supports the TypeScript 3.4 or above version. So, if we want to use Angular 8 for our application, then we need to first upgrade the TypeScript to 3.4 or above.

How do I install TypeScript globally?

You can use npm to install TypeScript globally, this means that you can use the tsc command anywhere in your terminal. To do this, run npm install -g typescript . This will install the latest version (currently 4.8).

How do I find the TypeScript version?

Test that the TypeScript is installed correctly by typing tsc -v into your terminal or command prompt. You should see the TypeScript version print out to the screen. For help on possible arguments you can type tsc -h or just tsc .


1 Answers

Use the version which set ng update command: npm install [email protected]

like image 161
bjdose Avatar answered Oct 15 '22 18:10

bjdose