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:
Resulting angular.json file does not lower case the project name, resulting in an error (see below):
Notice the resulting error:
π₯ 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:
- Created 3 years ago
- Reactions:1
- Comments:18 (11 by maintainers)
I am claiming this issue. I have started to work on the fix.
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.