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.

Generated angular.json file does not correctly lower case the application name

See original GitHub issue

🐞 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?

I’m not certain whether this is a regression. I don’t recall seeing the issue. No one had reported it to me previously. But that doesn’t mean it didn’t exist.

Description

When you create a new Angular project using ng new with an upper case or mixed case name, the Angular CLI correctly converts the name to lower case for the keys in the package.json file. It does not convert the name to lower case for the keys in the angular.json file. See the β€œMinimal Reproduction” for screen shots.

πŸ”¬ Minimal Reproduction

ng new Hello-World

Resulting package.json file correctly lower cases the project name: image

Resulting angular.json file does not lower case the project name, resulting in an error (see below): image

Notice the resulting error: image

πŸ”₯ Exception or Error





Property Hello-World is not allowed

🌍 Your Environment




Angular CLI: 9.1.3
Node: 12.16.1
OS: win32 x64

Angular: 9.1.4
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.3
@angular-devkit/build-angular     0.901.3
@angular-devkit/build-optimizer   0.901.3
@angular-devkit/build-webpack     0.901.3
@angular-devkit/core              9.1.3
@angular-devkit/schematics        9.1.3
@angular/cli                      9.1.3
@ngtools/webpack                  9.1.3
@schematics/angular               9.1.3
@schematics/update                0.901.3
rxjs                              6.5.5
typescript                        3.8.3
webpack                           4.42.0

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
karthick-manoharancommented, Apr 30, 2020

I am claiming this issue. I have started to work on the fix.

2reactions
DeborahKcommented, Apr 30, 2020

Thank you.

I’d like to see #2 as it is more friendly for beginners and for those used to being able to use mixed case project names as they can now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Property Not Allowed" in angular.json error in Visual Studio ...
If I change my project name to lower case, it appears to work. But my project name is an acronym, so upper case...
Read more >
Angular workspace configuration
The angular.json file at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults. These are used forΒ ...
Read more >
Errors – Vercel Docs
Definition: The request to a Serverless Function was not completed successfully. Occurrence: This could happen if the application contains an unhandledΒ ...
Read more >
User and Workspace Settings - Visual Studio Code
You can use IntelliSense in settings.json to help you find language-specific settings. All editor settings and some non-editor settings are supported. SomeΒ ...
Read more >
Creating a package.json file - npm Docs
You can add a package.json file to your package to make it easy for others ... The "name" field contains your package's name,...
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