当我进入终端时,我在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 6.0.5版本
npm update
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected]
ng new --name my-app
我有同样的问题。我使用的是角度cli版本6.0.4,看起来该版本存在一些问题。我卸载了6.0.4并安装了6.0.2,它解决了这个问题。
我发现版本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)
它对我有用
看起来像新的6.0.5版本修复了这个问题more info
不幸的是,由于在6.0.4版本之后发现了一些问题,我们被迫回滚。此版本与6.0.3相同。
在我们在更新Angular CLI版本后创建角度项目时,看起来新的6+版本在Mac中解决了这个问题。
所以运行这个命令:
npm i @schematics/angular@latest --save-dev