I am installed the latest version of angular-cli on my local and trying to create a new project using the command ng new ETG.WEB.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
Could somebody tell me if it is genuinely not as per angular-cli permit table naming conventions OR do i simply rename the project from ETG to ETG.WEB.UI once it is created.
The error “ng command not found” occurs when your system's shell cannot find the path to the ng cli binary. There are three major causes of this error: The ng CLI is not installed. The ng CLI is located in a different directory.
ng new command creates a workspace of given name with a default Angular Application. It provides interactive prompts to set optional configurations. All prompts have default values to choose.
To solve the error "ng: command not found", install the angular cli package globally by running npm install -g @angular/cli@latest and restart your terminal. If the command fails, run it with sudo and make sure the correct PATH is set in your system's environment variable.
Create a new project using a hyphen as the separator then rename the folder it creates.
ng new ETG-WEB-UI --style=scss
This will create a folder named ETG-WEB-UI. Simply rename it to ETG.WEB.UI either in the command prompt or in Windows.
Then run ng serve as normal:
ng serve
I've just tried this and so far I haven't had any issues with the project after renaming it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With