The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead

前端 未结 9 1459
失恋的感觉
失恋的感觉 2020-12-24 05:25

I starting getting this error on my Angular app:

The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead

9条回答
  •  再見小時候
    2020-12-24 06:02

    You should do npm install typescript@'>=2.7.2 <2.8.0'. This will install the correct typescript your project needs. Make sure you run this inside your Angular project.

    On Windows, you should use double quotes instead of single quotes, like so:

    npm install typescript@">=2.7.2 <2.8.0"
    

    Otherwise, you'll get The system cannot find the file specified..

提交回复
热议问题