I'm having this error when I try to create a new component anywhere inside the project:
PS C:\Users\Name\Documents\Project\project-app\src\app\modals> ng g c especificacaoTecnicaModal
Schematic input does not validate against the Schema: {"path":"/src/app/modals","displayBlock":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","style":"css","type":"Component","skipTests":false,"flat":false,"skipImport":false,"skipSelector":false,"export":false}
Errors:
Data path "" should have required property 'name'.
Here is my ng --version
Angular CLI: 6.1.4
Node: 14.17.0
OS: win32 x64
Angular: 6.1.10
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.7.5
@angular-devkit/schematics 12.0.4
@angular/animations 12.0.4
@angular/cdk 7.3.7
@angular/material 7.3.7
@ngtools/webpack 6.1.5
@schematics/angular 12.0.4
@schematics/update <error>
rxjs 6.0.0
typescript 2.7.2
webpack 4.9.2
It started when I was installing angular material. If I try to run ng serve or ng build --prod --base-href ./ it run normally. If you need more data just comment it and I'll answer.
Thanks to Adithya Sreyaj, the erros was only in @schematics/angular so I ran
npm i @schematics/[email protected]and then I could create a new componentNow My
ng --versionlooks like this:My @angular/animations changed but I don't think I really needed to change it