【问题标题】:Angular cli "invalid configuration" error on creating new app with CLI使用 CLI 创建新应用时出现 Angular cli“无效配置”错误
【发布时间】:2019-07-07 19:45:31
【问题描述】:

我正在尝试使用 Angular CLI 创建一个新应用程序。我不断收到“无效配置”错误。当我使用ng --version 命令时,我得到了同样的错误。

$ ng new angular_organicstore
An invalid configuration file was found 
['/Users/USERNAME/.angular.json']. Please delete the file before 
running the command.

节点版本:10.14.1

关于如何解决此错误的任何想法?非常感谢。

【问题讨论】:

  • 您好!似乎有很多与此相关的问题stackoverflow.com/a/53460171/10747134
  • 它提示您删除该路径上的文件您是否尝试过这样做并重新运行命令?
  • 我尝试在我的用户名文件夹中搜索 .angular/json 文件。但是文件不存在。
  • 仅供参考,通常以句点开头的文件不会显示在文件资源管理器/查找器中。

标签: angular angular-cli


【解决方案1】:

您必须删除您的 .angular.json 文件。

如果您使用的是 Windows,请打开 cmd 命令提示符并执行以下操作:

del Users\<USERNAME>\.angular.json

带壳bash:

rm Users/<USERNAME>/.angular.json

【讨论】:

    猜你喜欢
    • 2018-04-24
    • 2017-01-25
    • 1970-01-01
    • 1970-01-01
    • 2018-06-21
    • 2022-01-15
    • 2019-01-12
    • 1970-01-01
    相关资源
    最近更新 更多