Skip to content

ng new <project-name> -- Using "." or "_" in"project-name" produces errors. #11051

Closed

Description

@jafferh

Versions

Angular CLI: 6.0.5
Node: 10.2.1
OS: win32 x64
Angular:
...

Package Version

@angular-devkit/architect 0.6.5
@angular-devkit/core 0.6.5
@angular-devkit/schematics 0.6.5
@schematics/angular 0.6.5
@schematics/update 0.6.5
rxjs 6.2.0
typescript 2.7.2

Windows 10

Repro steps

  • ng new project.1
  • ng new project_1

Observed behavior

<!-- Normally this includes a stack trace and some more information. -->
-------------------------------------------------------------
$ ng new project.1
Project name "project.1" is invalid.
-------------------------------------------------------------
$ ng new project_1
Schematic input does not validate against the Schema: {"name":"project_1","version":"6.0.5","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null}
Errors:

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


### Desired behavior
<!--
What would like to see implemented?
What is the usecase?
What did you expect to see?
-->

* Expect "." or "_" to be valid characters in a project name as was in the case in older versions of CLI.

### Mention any other details that might be useful (optional)

Activity

  1. rafaelss95 commented on Jun 3, 2018

    @rafaelss95

    It seems that it produces error for any special char. I've tested it with - and / also.

  2. john-dieter commented on Jun 15, 2018

    @john-dieter

    We use App.projectname for everything. Now dead in water.

  3. kvloover commented on Jul 5, 2018

    @kvloover

    So far I'm managing to work around this by renaming the created folder after it has been scaffolded.
    So hope it helps those that land here while this is still open. :)

  4. kthy commented on Sep 12, 2018

    @kthy

    So far I'm managing to work around this by renaming the created folder after it has been scaffolded.

    ng new FooBar --directory Foo.Bar
    

    works for me in the sense that I don't need to rename the directory afterwards. The project is still referred to as FooBar rather than Foo.Bar in all the template files of course.

  5. pranavavva commented on Oct 18, 2018

    @pranavavva

    Maybe add a feature where if you want to include . or _ in the project name, you can enclose it in quotes. Ex:

    ng new "20avva.github.io"
    
  6. added this to the needsTriage milestone on Jan 24, 2019
  7. sachinhd517 commented on Mar 28, 2019

    @sachinhd517

    Can we install Angular 2.0.0 Version . How to install Angular 2 using CLI and which command we will write in CLI specific command.

  8. kthy commented on Mar 29, 2019

    @kthy

    Can we install Angular 2.0.0 Version .

    I guess you could. Long-term support for 2.x.x ended several years ago though, so I'm not sure why you would.

  9. pranavavva commented on Mar 29, 2019

    @pranavavva
  10. 3 remaining items

  11. added
    needs: investigationRequires some digging to determine if action is needed
    featureLabel used to distinguish feature request from other issues
    on May 26, 2020
  12. modified the milestones: needsTriage, Backlog on May 26, 2020
  13. self-assigned this
    on Nov 15, 2021
  14. added a commit that references this issue on Nov 16, 2021
    21809e1
  15. angular-automatic-lock-bot commented on Dec 17, 2021

    @angular-automatic-lock-bot

    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.

  16. locked and limited conversation to collaborators on Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions