这主要是ts编译器版本问题,一般是因为ts编译器版本过高导致。

解决方式:

  1. npm uninstall -g typescript
  2. npm install -g typescript
  3. tsc -v 查看安装的typescript版本
  4. 修改package.json中的typescript版本为当前电脑所安装版本
  5. 删除node_module
  6. 重新安装cnpm install
  7. npm ls typescript 如果都为typecript版本电脑所安装版本说明正确
  8. ng serve运行

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-06-16
  • 2022-12-23
  • 2022-03-07
相关资源
相似解决方案