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

前端 未结 9 1431
失恋的感觉
失恋的感觉 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 05:41

    This is just because in your projects package.json file has

    eg."devDependencies": {"typescript": "~2.8.3" }

    and in your machine where angular cli installed has "typescript": "2.7.2" version.

    You can check this by ng -v or ng v.

    So, just open package.json update your typescript version and run npm install and you are done.

提交回复
热议问题