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

问题描述 投票:2回答:6

当我进入终端时,我在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).

谁能告诉我?非常感谢

angular macos angular-cli
6个回答
2
投票

也许Angular 6.0.5版本

npm update
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected]
ng new --name my-app

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


1
投票

你可以试试以下:

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

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


1
投票

我有同样的问题。我使用的是角度cli版本6.0.4,看起来该版本存在一些问题。我卸载了6.0.4并安装了6.0.2,它解决了这个问题。


1
投票

我发现版本6.0.4的这个问题,不幸的是它仍然是在github-#11006(25-05-2.18 10:59 AM IST)。所以卸载angular cli并安装6.0.3。另一个问题我发现sh1校验和错误,它会在安装新的nodejs时发生。 (在windows机器中)安装新的cli

 1. npm uninstall -g @angular/cli
 2. npm install -g @angular/[email protected]
 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)

它对我有用


1
投票

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

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


0
投票

在我们在更新Angular CLI版本后创建角度项目时,看起来新的6+版本在Mac中解决了这个问题。

所以运行这个命令:

npm i @schematics/angular@latest --save-dev
© www.soinside.com 2019 - 2024. All rights reserved.