Angular编译器中的错误需要TypeScript> = 3.6.4和< 3.8.0,但是找到了3.8.2 [英] ERROR in The Angular Compiler requires TypeScript >=3.6.4 and <3.8.0 but 3.8.2 was found instead
本文介绍了Angular编译器中的错误需要TypeScript> = 3.6.4和< 3.8.0,但是找到了3.8.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我跑了
ng version
并获得以下输出:
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
如果我尝试将类型脚本设置得较低,则会抱怨该项目是Angular 9,并且无法使用该类型的类型脚本.不知道该怎么办,欢迎任何帮助,谢谢.
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.
推荐答案
使用设置ng更新命令的版本: npm install typescript@3.7.5
Use the version which set ng update command: npm install typescript@3.7.5
这篇关于Angular编译器中的错误需要TypeScript> = 3.6.4和< 3.8.0,但是找到了3.8.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文