WebStorm:新的AngularCli项目:错误:目录应匹配格式“path”

当我尝试创建一个新的Angular Cli项目时:

enter image description here

在执行新的angularcli –dir =几秒钟后收到此消息(在“运行”窗口中). 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":"angular-cli@angular.io"},"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":"angular-cli@angular.io"},"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

同样在Mac上:
enter image description here

它似乎与命令的这一部分有关: – dir = ..但我不知道为什么以及如何纠正它!

(我知道我可以通过命令行独立创建一个新项目,然后在WebStorm中打开它,但由于某些原因不想这样做.)

这是一个已知的cli 1.7.x问题 – https://github.com/angular/angular-cli/issues/9655;很遗憾,到目前为止,我们无法解决这个问题……我们正在与Angular团队合作,请关注 WEB-31291以获取更新. 作为解决方法,您可以尝试使用ng new< project_name>在终端中创建新的角度应用程序.然后在WebStorm中打开生成的项目文件夹
相关文章
相关标签/搜索