使用 Angular-CLI 6.1.2 创建新项目时出错 [英] Error when creating new project with Angular-CLI 6.1.2

查看:32
本文介绍了使用 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

这篇关于使用 Angular-CLI 6.1.2 创建新项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆