【发布时间】:2018-06-24 22:24:01
【问题描述】:
对于已经创建的 Angular 项目,如何解决这个问题?我想用 2.6.2 Typescript
@angular/compiler-cli@5.2.0 requires typescript@'>=2.4.2 <2.6.0' but 2.6.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.
Please run the following command to install a compatible version of TypeScript.
npm install typescript@'>=2.4.2 <2.6.0'
To disable this warning run "ng set warnings.typescriptMismatch=false".
The "@angular/compiler-cli" package was not properly installed. Error: Error: Cannot find module '@angular/compiler-cli'*
【问题讨论】:
-
运行
npm install typescript。忽略警告。 -
谢谢,通过运行
npm install typescript它安装了 2.4.2 版 -
试试
npm install typescript@latest --peer
标签: angular typescript npm angular-cli