Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schematic input does not validate against the Schema Data path ".name" should match format "html-selector". #14874

Closed
gurezo opened this issue Jun 24, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@gurezo
Copy link

commented Jun 24, 2019

馃悶 bug report

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

Affected Package

may be @angular/bazel@8.0.2

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/bazel@8.0.2 requires a peer of @angular/compiler-cli@8.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/bazel@8.0.2 requires a peer of @bazel/typescript@0.* but none is installed. You must install peer dependencies yourself.
npm WARN @angular/bazel@8.0.2 requires a peer of typescript@>=3.4 <3.5 but none is installed. You must install peer dependencies yourself.

+ @angular/bazel@8.0.2
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.
angular/angular#31233

@alan-agius4 alan-agius4 self-assigned this Jun 24, 2019

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

commented Jun 24, 2019

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.

@alan-agius4 alan-agius4 transferred this issue from angular/angular Jun 24, 2019

@ngbot ngbot bot added this to the needsTriage milestone Jun 24, 2019

@ngbot ngbot bot modified the milestone: needsTriage Jun 24, 2019

@ngbot ngbot bot added this to the Backlog milestone Jun 24, 2019

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

commented Jun 24, 2019

We have looked into this and and it seems that the problem is with hairline spaces (U+200A) and spaces (U+32). We don鈥檛 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.