question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:11

github_iconTop GitHub Comments

14reactions
kthycommented, Sep 12, 2018

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.

11reactions
john-dietercommented, Jun 15, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project name is invalid while creating the project with ng new ...
UI --style=scss. I am getting error message Project name ETG.WEB.UI is invalid. It runs successfully if I use command ng new ETG --style=scss....
Read more >
ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
rainbow loom duck charm
Find many great new & used options and get the best deals for 10 CHARMS ... If you spot any errors in our...
Read more >
ng new - Angular
Creates a new workspace and an initial Angular app. ng ... The new workspace folder is given the specified project name, and contains...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found