Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm: New AngularCli Project: Error: directory should match format "path"

When I try to create a new Angular Cli project:

enter image description here

receive this message (in Run window) after a few seconds after executing ng new angularcli --dir=. command by IDE:

"C:\Program Files\nodejs\node.exe" C:\Users\I\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng new angularcli --dir=.
Error: Schematic input does not validate against the Schema: {"directory":".","name":"angularcli","skipGit":false,"style":"css","version":"1.7.3","commit":{"message":"chore: initial commit from @angular/cli\n\n    _                      _                 ____ _     ___\n   / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\n  / △ \\ | '_ \\ / _\\` | | | | |/ _\\` | '__|   | |   | |    | |\n / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\n/_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\n               |___/\n","name":"Angular CLI","email":"[email protected]"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false}
Errors:
  .directory should match format "path"
Schematic input does not validate against the Schema: {"directory":".","name":"angularcli","skipGit":false,"style":"css","version":"1.7.3","commit":{"message":"chore: initial commit from @angular/cli\n\n    _                      _                 ____ _     ___\n   / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\n  / △ \\ | '_ \\ / _\\` | | | | |/ _\\` | '__|   | |   | |    | |\n / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\n/_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\n               |___/\n","name":"Angular CLI","email":"[email protected]"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false}
Errors:
  .directory should match format "path"
Done

Similarly on Mac: enter image description here


It seems to be relevant to this part of the command: --dir=.. But I don't know why and how to correct it!

(I know that I can create a new project via command line independently and then open it in WebStorm, but don't want this for some reasons.)

like image 831
Mir-Ismaili Avatar asked Mar 28 '18 21:03

Mir-Ismaili


2 Answers

it's a known cli 1.7.x issue - https://github.com/angular/angular-cli/issues/9655; unfortunately we have been unable to fix it on our end so far... We are working with Angular team on this, please follow WEB-31291 for updates. As a workaround, you can try creating new angular app in terminal using ng new <project_name> and then opening the generated project folder in WebStorm

like image 124
lena Avatar answered Nov 11 '22 09:11

lena


Do not include project name special characters. for example this is wrong: www_testProject.

This is correct: wwwTestProject

like image 1
Onur İnci Avatar answered Nov 11 '22 07:11

Onur İnci