gpt4 book ai didi

directory - WebStorm:新的 AngularCli 项目:错误:目录应匹配格式 "path"

转载 作者:行者123 更新时间:2023-12-02 11:29:28 26 4
gpt4 key购买 nike

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

enter image description here

通过 IDE 执行 ng new angularcli --dir=. 命令几秒钟后收到此消息(在 Run 窗口中):

"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中打开生成的项目文件夹

关于directory - WebStorm:新的 AngularCli 项目:错误:目录应匹配格式 "path",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49544714/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com