使用 ng-new 我得到 "Schematic input does not validate against the Schema":

Using ng-new I'm getting "Schematic input does not validate against the Schema":

我收到以下错误,

$ ng new ng_api_browser

Schematic input does not validate against the Schema: {"name":"ng_api_browser","version":"7.3.1","routing":true,"style":"sass"}
Errors:

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

如何解决这个错误?

原因是项目名称中的_无效。请改用 -

如果你已经完成 ng new 并输入 ng_api_browser 你会看到 ng 拒绝它。