示意图输入未针对Angular 7上的Schema:{"name":"testng7"}进行验证 [英] Schematic input does not validate against the Schema: {"name":"testng7"} on Angular 7
问题描述
我在Mac OS上将Angular CLI更新为最新的@angular/cli@7.0.2
.发出命令ng new testng7
时,出现此错误:
I updated the Angular CLI to the latest @angular/cli@7.0.2
on a Mac OS. When issuing the command ng new testng7
, I get this error:
Schematic input does not validate against the Schema: {"name":"testng7"}
Errors:
Data path "" should have required property 'version'.
什么也没有创建.有任何提示如何解决?
And nothing is created. Any clues how to fix?
推荐答案
首先,要进行升级,我做到了:
First, to upgrade, I did this:
npm i -g @angular/cli
npm i @angular/cli
在全局和本地安装.运行npm audit fix
会显示npm日志中缺少package.json
的问题-我的根目录中缺少此问题!因此,我在主目录中使用以下命令创建了一个:
to install globally and locally. Running an npm audit fix
revealed there is a problem with a missing package.json
in the npm logs - missing from my root directory! So I created one with the following command in my home directory:
npm init --yes
为默认值.现在发布ng new projName
作品.
for a default one. Now issuing an ng new projName
works.
这篇关于示意图输入未针对Angular 7上的Schema:{"name":"testng7"}进行验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!