0

I just upgraded to Angular 7 and I get the following error when trying to create a new project:

Schematic input does not validate against the Schema: {"name":"test"} Errors: Data path "" should have required property 'version'.

Angular CLI: 7.3.4
Node: 10.15.2
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.4
@angular-devkit/core         7.3.4
@angular-devkit/schematics   7.3.4
@schematics/angular          7.3.4
@schematics/update           0.13.4
rxjs                         6.3.3
typescript                   3.2.4

MacBook-Pro-de-Pastor:~ pacozevallos$ ng new test
Schematic input does not validate against the Schema: {"name":"test"}
Errors:

Data path "" should have required property 'version'.
MacBook-Pro-de-Pastor:~ pacozevallos$ 

After having updated Angular 7 I reinstalled it with the following commands:

npm uninstall -g @angular/cli (add sudo in the start if using Linux)
npm cache clean --force / npm cache verify
npm install -g @angular/cli

But this last one did not work either.

Any ideas?

Paco Zevallos
  • 2,165
  • 7
  • 30
  • 68

1 Answers1

0

On Windows 10, I was able to resolve this by running PowerShell in Administrator. This is new as before that wasn't required.

I have spent a lot of time this morning trying to find any answers beyond downgrading versions and then tried it in admin mode after I discovered I was able to "ng new" into a directory that didn't exist.

I don't know Mac very well but I believe the equivalent would be prepending sudo to the command.

sudo ng new project-name

I would recommend bringing it to the Angular Github for some better/quicker support.

JFoxx64
  • 262
  • 2
  • 11