Angular-cli: Schematic input does not validate against the Schema Data path ".name" should match format "html-selector".

Created on 24 Jun 2019  Ā·  3Comments  Ā·  Source: angular/angular-cli

šŸž bug report

- [ x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Affected Package

may be @angular/[email protected]

Is this a regression?

No, this never worked.

Description

```
Schematic input does not validate against the Schema: {"name":"ng-bazel-sampleā€Š--collection=@angular/bazel","version":"8.0.3","routing":false,"style":"scss"}
Errors:

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

šŸ”¬ Minimal Reproduction

following steps

  1. angular/bazel global install

    • npm install -g @angular/bazel

  2. create a project.

    • ng new ng-bazel-sampleā€Š--collection=@angular/bazel

  3. CSS and SASS,SCSS any style fail to create a project

šŸ”„ Exception or Error


āžœ  ~ npm install -g @angular/bazel
/Users/lifewood/.nodebrew/node/v10.14.1/bin/ngc-wrapped -> /Users/lifewood/.nodebrew/node/v10.14.1/lib/node_modules/@angular/bazel/src/ngc-wrapped/index.js
/Users/lifewood/.nodebrew/node/v10.14.1/bin/api-extractor -> /Users/lifewood/.nodebrew/node/v10.14.1/lib/node_modules/@angular/bazel/src/api-extractor/index.js
/Users/lifewood/.nodebrew/node/v10.14.1/bin/packager -> /Users/lifewood/.nodebrew/node/v10.14.1/lib/node_modules/@angular/bazel/src/ng_package/packager.js
/Users/lifewood/.nodebrew/node/v10.14.1/bin/xi18n -> /Users/lifewood/.nodebrew/node/v10.14.1/lib/node_modules/@angular/bazel/src/ngc-wrapped/extract_i18n.js
/Users/lifewood/.nodebrew/node/v10.14.1/bin/modify_tsconfig -> /Users/lifewood/.nodebrew/node/v10.14.1/lib/node_modules/@angular/bazel/src/modify_tsconfig.js
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @bazel/typescript@0.* but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of typescript@>=3.4 <3.5 but none is installed. You must install peer dependencies yourself.

+ @angular/[email protected]
added 66 packages from 104 contributors in 9.781s
āžœ  ~ cd work

āžœ  work ng new ng-bazel-sampleā€Š--collection=@angular/bazel
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? CSS
Schematic input does not validate against the Schema: {"name":"ng-bazel-sampleā€Š--collection=@angular/bazel","version":"8.0.3","routing":false,"style":"css"}
Errors:

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


āžœ  work ng new ng-bazel-sampleā€Š--collection=@angular/bazel
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? Sass   [ http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html       ]
Schematic input does not validate against the Schema: {"name":"ng-bazel-sampleā€Š--collection=@angular/bazel","version":"8.0.3","routing":false,"style":"sass"}
Errors:

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


āžœ  work ng new ng-bazel-sampleā€Š--collection=@angular/bazel
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? SCSS   [ http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax ]
Schematic input does not validate against the Schema: {"name":"ng-bazel-sampleā€Š--collection=@angular/bazel","version":"8.0.3","routing":false,"style":"scss"}
Errors:

  Data path ".name" should match format "html-selector".
āžœ  work

šŸŒ Your Environment

Angular Version:


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / ā–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 8.0.3
Node: 10.14.1
OS: darwin x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.800.3
@angular-devkit/core         8.0.3
@angular-devkit/schematics   8.0.3
@schematics/angular          8.0.3
@schematics/update           0.800.3
rxjs                         6.4.0

Anything else relevant?
may be related to this issue.
https://github.com/angular/angular/issues/31233

angulacli low broken bufix

Most helpful comment

We have looked into this and and it seems that the problem is with hairline spaces (U+200A) and spaces (U+32). We don’t do string splitting for arguments, this is done by Node. In the above case, Node gives us a string[] and will, in will contain ["ng", "new", "ng-bazel-sample --collection=@angular/bazel"].

It looks like the issue originated from an incorrect space character in the example here: https://blog.angular.io/try-bazels-opt-in-preview-in-angular-cli-b9430bd00e82

We have replaced the hairline space with a proper space.

ng new ng-bazel-sample --collection=@angular/bazel

Sorry for the inconvenience.

All 3 comments

I am going to move this to the CLI repo, as there seems to be something fishy with the command parsing and the U+200A character.

@gurezo, to get around this, just remove the spaces from the command and re-type them.

We have looked into this and and it seems that the problem is with hairline spaces (U+200A) and spaces (U+32). We don’t do string splitting for arguments, this is done by Node. In the above case, Node gives us a string[] and will, in will contain ["ng", "new", "ng-bazel-sample --collection=@angular/bazel"].

It looks like the issue originated from an incorrect space character in the example here: https://blog.angular.io/try-bazels-opt-in-preview-in-angular-cli-b9430bd00e82

We have replaced the hairline space with a proper space.

ng new ng-bazel-sample --collection=@angular/bazel

Sorry for the inconvenience.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NCC1701M picture NCC1701M  Ā·  3Comments

gotschmarcel picture gotschmarcel  Ā·  3Comments

jbeckton picture jbeckton  Ā·  3Comments

delasteve picture delasteve  Ā·  3Comments

rajjejosefsson picture rajjejosefsson  Ā·  3Comments