Skip to content

Validation of projectname is done after selecting routing/style #17595

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
1 of 15 tasks
mhombach opened this issue May 1, 2020 · 4 comments
Closed
1 of 15 tasks

Validation of projectname is done after selecting routing/style #17595

mhombach opened this issue May 1, 2020 · 4 comments

Comments

@mhombach
Copy link

mhombach commented May 1, 2020

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

I think this bug was existing for along time.

Description

If i create a new project by ng new xyz and the projectname is not valid (for example test_project because of the underscore), the CLI is telling me about the invalid name only AFTER i had to select angular-routing (y/N) and what style-type i want to use (css/scss/...).
This should be changed in a way where the proejctname is validated FIRST, before i have to choose other things.
If the selections i make could have an effect on the validation, that would be a different story, but if the projectname is invalid, there is nothing in those 2 selections that could make it working.

🔬 Minimal Reproduction

ng new test_project
<select Y/N for routing>
<select style type>

🔥 Exception or Error


Project name "test_project" is not valid. New project names must start with a letter, and must contain only alphanumeric characters or dashes. When adding a dash the segment after the dash must also start with a letter.

🌍 Your Environment


Angular CLI: 9.1.1
Node: 13.3.0
OS: win32 x64

Angular:
...
Ivy Workspace:

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.901.1
@angular-devkit/core         9.1.1
@angular-devkit/schematics   9.1.1
@schematics/angular          9.1.1
@schematics/update           0.901.1
rxjs                         6.5.4

Anything else relevant?

@alan-agius4
Copy link
Collaborator

Duplicate of #14994

@alan-agius4 alan-agius4 marked this as a duplicate of #14994 May 1, 2020
@mhombach
Copy link
Author

mhombach commented May 1, 2020

Searched for similar issues before, sorry, it seems i used different words for searching :/

@alan-agius4
Copy link
Collaborator

No worries @mhombach 😁

@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 Jun 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants