Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 6 CLI `Unknown option: '--app'`

Tags:

angular

I have multiple apps in the same Angular project. After upgrading from Angular 5 to 6 when I try to run:

ng serve --app myAppOne

I am getting this error:

Unknown option: '--app'

It seems that the --app options is not supported any more. What is the best way to specify the app to run in Angular 6?

like image 222
user2846469 Avatar asked May 11 '18 12:05

user2846469


People also ask

How to work with angular CLI?

To work with Angular CLI, we need to have it installed on our system. To create a new project, we can run the following command in the command line and the project will be created. 4200 is the default port used when a new project is created.

How to change the locale in angular 9?

With Angular 9, none of the above answers work (for ng serve at least). Here's how to do it: Open angular.json file, go to architect -> build -> options section. Add the option "i18nLocale": "pt" for pt locale.

What happened to --locale in ng build?

Apparently there is a PR for the documentation update, which explains how to do it (pretty much how I wrote it here ;-) ) For the record, --locale was also removed from ng build but they introduced instead --i18n-locale as specified in angular documentation.

How do I add a new component to an existing ngmodule?

The new component is the entry component of the declaring NgModule. The declaring NgModule exports this component. Create the new files at the top level of the current project. Include styles inline in the component.ts file. Only CSS styles can be included inline.


1 Answers

It is not supported any more, these are the possible alternatives :

ng serve --project=myAppOne

ng serve --project myAppOne

ng serve myAppOne

like image 86
KarlR Avatar answered Oct 28 '22 14:10

KarlR