ng new fails with "Schematic input does not validate against the Schema"
Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [x ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Node Version:
$ node --version
v10.12.0
NPM Version:
$ npm --version
6.4.1
Angular Version:
$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 7.0.2
Node: 10.12.0
OS: darwin x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.10.2
@angular-devkit/core 7.0.2
@angular-devkit/schematics 7.0.2
@schematics/angular 7.0.2
@schematics/update 0.10.2
rxjs 6.3.3
typescript 3.1.3
OS: MacOS Mojave
Repro steps
ng new ng7app
The log given by the failure
Schematic input does not validate against the Schema: {"name":"ng7app"} Errors:
Data path "" should have required property 'version'.
Desired functionality
I would like to generate a new Angular Workspace.
Mention any other details that might be useful
if i provide a 'version', then i get a different error :
$ ng new ng7app --version 7
Cannot read property 'entries' of undefined
This is generally because the CLI found some file like an old angular.json in the current directory or a parent directory. We should improve the error message - for now, try running the ng new command in a different directory or removing some stale files if you can guess which they are...
hi @alexeagle thanks,
i didn't have a rogue angular.json file, but i did have a rogue 'local' install in my Projects folder, must of forgot the -g sometime previously.
Anyway, Seems to have been resolved by removing the unneeded node_modules folder.
@hexl84 your issue is different from the original post. Please keep issues targetted to one thing at a time.
Same here: ng -version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
Angular CLI: 7.0.3 Node: 11.0.0 OS: win32 x64 Angular: ...
Package Version
@angular-devkit/architect 0.10.3 @angular-devkit/core 7.0.3 @angular-devkit/schematics 7.0.3 @schematics/angular 7.0.3 @schematics/update 0.10.3 rxjs 6.3.3 typescript 3.1.3
**>ng new DemoApp Schematic input does not validate against the Schema: {"name":"DemoApp"} Errors:
Data path "" should have required property 'version'.**
Same here ._.
> ng --version
Angular CLI: 7.0.4
Node: 10.7.0
OS: darwin x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.10.4
@angular-devkit/core 7.0.4
@angular-devkit/schematics 7.0.4
@schematics/angular 7.0.4
@schematics/update 0.10.4
rxjs 6.3.3
typescript 3.1.3
>bash-3.2$ ng new serv
Schematic input does not validate against the Schema: {"name":"serv"}
Errors:
Data path "" should have required property 'version'.
Con la nueva actualización del Angular CLI debes de especificar con que tipo de versión trabajarás
ng new project-name --version=7.0.4 o ng new project-name --version=7.0.2
Saludos
@SantiPrll Hello, thank you for help but now I get this error.
ng new freeng --version=7.0.2
Could not find (undefined)
using @SantiPrll comment it worked for me

@westdabestdb Si te fijas replique tu ejemplo y si trabaja, te recomiendo que resinstalar el CLI de forma global.
As SantiPrII recommended, I reinstalled the angular cli globally. I'm still getting the "Could not find (undefined)" error after running both "ng new angular-website --version=7.0.4" and "ng new angular-website --version=7.0.2". Does anyone know what "(undefined)" could be referring to?
Que versión de node estás utilizando?
Que versión de node estás utilizando?
v11.0.0
I removed node_modules folder in users/{user name} and ng new [appname] now working.
Hi, For resolve this error uninstall @schematics/angular package or remove @schematics directory from node_modules directory then install a previous version. For example: npm i @schematics/[email protected] --save-dev
node_modules
this solved my issue! thanx
I'm closing this issue as the original issue has been resolved.
I had the same error when I used underscores in the new app name instead of hyphens:
npm new my_new_app >>> Fails npm new my-new-app >>> Succeeds
After trying all these things, I get the following error for the command ng new getrequest --version=7.1.2
Tree type is not supported.
I am trying the above command on CLI.
Some time I get the error: Could not find (undefined) I tried running as a super user (in Linux)
I had the same error when I used underscores in the new app name instead of hyphens:
I had the same error when one of the name-parts was digits, e.g. prototype-1234. Changing it to prototype-s1234 works. So here it's a case of a bad regex.
Hello, StephenWTurner Thanks for your comment Could you tell me the reason why it solves the issue?