使用 Angular-CLI 6.1.2 创建新项目时出错

使用 Angular-CLI 6.1.2 创建新项目时出错

问题描述:

我尝试使用 ng new angular-6-boilerplate 创建一个新的 Angular 项目,但我不能再使用 angular-cli 最新版本.我正在使用 Windows 终端来创建我的项目,但出现此错误.

I tried creating a new Angular project using ng new angular-6-boilerplate but I can't do it anymore with angular-cli latest version. I'm using terminal for windows to create my project but I got this error.

Schematic 输入不会根据 Schema 进行验证:{"name":"angular-6-boilerplate","version":"6.1.2","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"提交":null}错误:

Schematic input does not validate against the Schema: {"name":"angular-6-boilerplate","version":"6.1.2","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null} Errors:

  Data path ".name" should match format "html-selector".

为什么我会收到此错误?

Why am I getting this error?

不要包含项目名称的特殊字符或数字.请尝试以下操作:

Do not include project name special characters or numbers. Try the following:

$ ng new angular-boilerplate

我做了一些研究&发现这来自负责创建新 Angular 应用程序的架构此处链接

I did some research & found out that this comes from the schema responsible of creating new Angular applications Link Here