Schematic input does not validate against the Schema: {“name”:“testng7”} on Angular 7

前端 未结 6 2083
渐次进展
渐次进展 2020-12-16 18:39

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:

         


        
6条回答
  •  醉梦人生
    2020-12-16 19:01

    First, to upgrade, I did this:

    npm i -g @angular/cli
    npm i @angular/cli
    

    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
    

    for a default one. Now issuing an ng new projName works.

提交回复
热议问题