简体   繁体   English

Angular 6 CLI`未知选项:' - app'

[英]Angular 6 CLI `Unknown option: '--app'`

I have multiple apps in the same Angular project. 我在同一个Angular项目中有多个应用程序。 After upgrading from Angular 5 to 6 when I try to run: 我尝试运行时从Angular 5升级到6:

ng serve --app myAppOne

I am getting this error: 我收到此错误:

Unknown option: '--app'

It seems that the --app options is not supported any more. 似乎不再支持--app选项。 What is the best way to specify the app to run in Angular 6? 指定在Angular 6中运行的应用程序的最佳方法是什么?

它不再受支持,这些是可能的替代方案:

ng serve --project=myAppOne

ng serve --project myAppOne

ng serve myAppOne

You can search OldAppName and replace with your new app myAppOne first, then run the project with specific port. 您可以先搜索OldAppName并替换为新应用程序myAppOne ,然后使用特定端口运行该项目。

ng serve --project=myAppOne --port 4202

if browser is not automatically opened the url then place it manually 如果浏览器没有自动打开网址,则手动放置

http://localhost:4202 HTTP://本地主机:4202

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM