【问题标题】:Versions of @angular/compiler-cli and typescript could not be determined in the Angular Js@angular/compiler-cli 和 typescript 的版本无法在 Angular Js 中确定
【发布时间】:2018-11-28 03:27:05
【问题描述】:

无法确定 @angular/compiler-cli 和 typescript 的版本。最常见的原因是 npm 安装损坏。 请确保您的 package.json 在 devDependencies 中同时包含 @angular/compiler-cli 和 typescript,然后删除 node_modules 和 package-lock.json(如果有的话)并再次运行 npm install。 p>

更多详情请看附件

我添加了@angular/cli、@angular/compilet-cli 和打字稿,如图所示。

我已更新相关版本并运行 npm i 重新安装所有包,重新启动 VS 代码。但是显示同样的错误。

我已经尝试了Versions of @angular/compiler-cli and typescript could not be determined 的答案。但没有运气。

寻求帮助。

【问题讨论】:

标签: angular typescript npm angular-cli


【解决方案1】:

解决问题的步骤:

  • 删除 node_modules 文件夹
  • 运行 npm install --only=dev --legacy-bundling=false
  • 运行 npm start

【讨论】:

  • 我也试过了,但是没有运气!!所有依赖项都安装在 node_Modules 下,然后我也面临这样的错误。我还提到了 Devdependenices 中的 cli 和 typeScripts。
  • 现在试试 --> npm install --only=dev --legacy-bundling=false
  • 只运行 npm start
  • jsut 尝试使用 ng serve 或 npm start
猜你喜欢
  • 2018-04-21
  • 1970-01-01
  • 2021-08-07
  • 2021-09-11
  • 1970-01-01
  • 2019-11-07
  • 1970-01-01
  • 2018-02-04
  • 2017-09-07
相关资源
最近更新 更多