-
Notifications
You must be signed in to change notification settings - Fork 12k
ng new fails with "Schematic input does not validate against the Schema" #12690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is generally because the CLI found some file like an old |
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 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:
/ △ \ | '_ \ / Angular CLI: 7.0.3 Package Version@angular-devkit/architect 0.10.3 **>ng new DemoApp Data path "" should have required property 'version'.** |
Same here ._.
|
Con la nueva actualización del Angular CLI ng new project-name --version=7.0.4 Saludos |
@SantiPrll Hello, thank you for help but now I get this error. |
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". |
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: |
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 |
After trying all these things, I get the following error for the command Tree type is not supported. I am trying the above command on CLI. Some time I get the error: Could not find (undefined) |
I had the same error when one of the name-parts was digits, e.g. |
Hello, StephenWTurner |
Hi B1u2Pr0, I'm not sure it does solve the original issue at all. However, it allows a simple typo to be eliminated before getting unrelated 'me toos', |
I was facing the same issue... The problem for me was , I was using an underscore when creating the directory name. |
I have the same error creating new project with underscore
Anyway to resolve this? It's ridiculous that the project must not contain underscore in order for the cli to successfully initialize the app. |
Angular CLI: 6.2.9 Package Version@angular-devkit/architect 0.8.9 Schematic input does not validate against the Schema: {"version":"6.2.9","skipGit":false,"experimentalIvy":false,"skipInstall":false,"linkCli":false,"commit":true,"newProjectRoot":"projects","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","style":"css","skipTests":false,"createApplication":true,"minimal":false} Data path "" should have required property 'name'. |
Eliminar la carpeta de node_modules funcionó para mí, había quedado un package.json que también lo eliminé. Angular CLI: 7.3.4 |
Apparently if your project name has a "_" or "-" (underscore or hyphen) it tends to throw this error. I removed the special chars and it worked ok. |
had same issue and using hyphens instead of underscore worked perfectly |
have the sane trouble npm uninstall -g angular-cli reinstall helps me |
I had this same issue and just had to make it |
🤦♂️ - This worked for me. Thanks @johnmanoahs |
For me, before, I updated npm : "npm update" and after run : "ng new projetc-teste --version=7.3.6" |
i'm still facing the same issue.My current angular version is 7.3.6 but error still exist ng new learn-curve Data path "" should have required property 'version'. i also tried ng new projetc-teste --version=7.3.6 Please help me out |
@mohanacchu try no to use '-' on the name of the project. Something is wrong with newer versions in that regard |
Try inside your project to remove node_module and run npm install again |
Strange but this actually resolved the schematic issue. |
Thanks, this worked for me. |
3 things you should check if you face problem on ng new
Hope this will help you.... |
mine had alphanumeric. Removed the number and now its working. Ty |
HI, npm i @schematics/angular@latest --save-dev after applying this no need to write version after angular 7 project name just write |
I deleted the -3 at the end of my project name and then it worked. :) ng new my-project-3 ----> Doesn't work |
It seems the CLI doesn't like project names that end with a dash/underscore and only digits (e.g |
For me, helped removing ~/package-lock.json (who knows why that file was in my home) |
use |
previous CLI version:-- 7.3.8 |
In my case i had an app anem like |
I was getting this error when I had an underscore sign in my project name. Worked normally after removing it. Angular CLI: 7.3.8 |
this one worked fine for me. |
Resolved as follows:- npm uninstall -g @angular/cli |
first type ng -v |
I had the same problem with ng new naq_monthly_settlement_report. I fixed it with ng new naq-monthly-settlement-report |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Node Version:
NPM Version:
Angular Version:
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 :
The text was updated successfully, but these errors were encountered: