Skip to content

ng new game-2d fails #13885

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leegee opened this issue Mar 12, 2019 · 6 comments
Closed

ng new game-2d fails #13885

leegee opened this issue Mar 12, 2019 · 6 comments
Labels
area: @angular-devkit/schematics freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@leegee
Copy link

leegee commented Mar 12, 2019

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

?

Description

Apparently can't create a new project with a hyphen in the name.

leege@studio MINGW64 /l/src/game-2d
$ npm install -g @angular/cli
C:\Users\leege\AppData\Roaming\npm\ng -> C:\Users\leege\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @angular/[email protected]
added 110 packages from 91 contributors, removed 61 packages and updated 27 packages in 17.326s

leege@studio MINGW64 /l/src/game-2d
$

leege@studio MINGW64 /l/src/game-2d
$ ng new game-2d
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS    (.css )
Schematic input does not validate against the Schema: {"name":"game-2d","version":"7.3.5","routing":true,"style":"css"}
Errors:

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

leege@studio MINGW64 /l/src/game-2d
$ ng new game2d
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS    (.css )
CREATE game2d/angular.json (3807 bytes)
CREATE game2d/package.json (1305 bytes)
CREATE game2d/README.md (1023 bytes)...
...etc...

🔬 Minimal Reproduction

ng new game-2d

🔥 Exception or Error

As above:


Schematic input does not validate against the Schema: {"name":"game-2d","version":"7.3.5","routing":true,"style":"css"}
Errors:

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

🌍 Your Environment


Angular CLI: 7.3.5
Node: 11.9.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.5
@angular-devkit/core         7.3.5
@angular-devkit/schematics   7.3.5
@schematics/angular          7.3.5
@schematics/update           0.13.5
rxjs                         6.3.3
typescript                   3.2.4
@alan-agius4
Copy link
Collaborator

Hi, the issue here is the number as html selectors should not contain digits.

Seeing specs here: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name

@leegee
Copy link
Author

leegee commented Mar 12, 2019 via email

@leegee
Copy link
Author

leegee commented Mar 12, 2019

Should I create a new issue with reference to the specs, or have I misunderstood?

@alan-agius4 alan-agius4 reopened this Mar 12, 2019
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Mar 12, 2019

Re-opened as your clarification seems corrent.

Thank you.

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Mar 12, 2019

Hi again, actually, this was fixed in this #13837

See this spec https://github.com/angular/angular-cli/pull/13837/files#diff-867e0bcfb9109ac41d6c72f11fc039a0R46

This will be available in the next beta (v8.0.0-beta.6).

Thanks

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/schematics freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests

2 participants