使用Angular-CLI 6.1.2创建新项目时出错 [英] Error when creating new project with Angular-CLI 6.1.2
问题描述
我尝试使用 ng新的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.
示意图输入未针对该架构进行验证:
{ name: angular-6-boilerplate, version: 6.1.2, newProjectRoot: projects, skipInstall:false, linkCli:false, skipGit:false , commit: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".
为什么会出现此错误?
推荐答案
不包括项目名称的特殊字符或数字。尝试以下操作:
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
这篇关于使用Angular-CLI 6.1.2创建新项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!