代码之家  ›  专栏  ›  技术社区  ›  Bob Zheng

数据路径“”不应具有其他属性(dryRun)

  •  7
  • Bob Zheng  · 技术社区  · 8 年前

    当我进入终端时,我在MAC中安装了最新的Angular 6.0.4:

    ng new happiness
    

    显示:

    Schematic input does not validate against the Schema: {"dryRun":false,"version":"6.0.4","skipGit":false,"skipInstall":false,"linkCli":false,"commit":true,"newProjectRoot":"projects","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","style":"css","skipTests":false} Errors:Data path "" should NOT have additional properties(dryRun).
    

    有人能告诉我吗? 谢谢

    7 回复  |  直到 8 年前
        1
  •  3
  •   RajeshKdev    8 年前

    也许是Angular 6.0.5版本

    npm update
    npm uninstall -g @angular/cli
    npm cache verify
    npm install -g @angular/cli@6.0.5
    ng new --name my-app
    

    另一个线程是相同的: Issue while ng new app-name angular cli 6.0.4

        2
  •  3
  •   Anshuman Jaiswal    8 年前

    你能试试以下几点吗

    ng update @angular/cli --migrate-only --from=1.7.4
    

    有一个问题。你可以找到 here .

        3
  •  1
  •   Sarun Paisarnsrisomsuk    8 年前

    我也有同样的问题。我使用的是angular cli版本6.0.4,该版本似乎存在一些问题。我卸载了6.0.4,安装了6.0.2,解决了这个问题。

        4
  •  1
  •   Vishnu KR    8 年前

    我在版本6.0.4中发现了这个问题,但不幸的是,它仍然存在(IST时间25-05-2.18上午10:59) github-#11006 .因此,卸载angular cli并安装6.0.3。我发现的另一个问题是sh1校验和错误,安装新节点时会发生。 (在windows机器中) 要安装新的cli

     1. npm uninstall -g @angular/cli
     2. npm install -g @angular/cli@6.0.3
     3. npm cache verify
    

    如果出现Sha1和sha512校验和错误,

    If already node installed and you are planning to install new node and new 
    cli then uninstall old nodejs then delete the cache manually before 
    installing new nodejs (C:\Users\<username>\AppData\Roaming\npm & C:\Users\ 
    <username>\AppData\Roaming\npm)
    

    这对我有用

        5
  •  1
  •   Kasiriveni    8 年前

    看起来像是新的 6.0.5 版本修复了这个问题 more info

    不幸的是,由于在发布6.0.4版本后发现了一些问题,我们被迫回滚。此版本与6.0.3相同。

        6
  •  0
  •   Samuel Philipp    7 年前

    当我们在更新angular CLI版本后创建angular项目时,新的6+版本似乎修复了Mac中的这个问题。

    所以运行这个命令:

    npm i @schematics/angular@latest --save-dev
    
        7
  •  0
  •   Kevin Beal    5 年前

    错误消息是,您需要从json结构中删除“dryRun”键。添加 --dry-run 改为使用cli命令(如果需要)。