无法确定Architect命令angular4的项目或目标

时间:2018-08-24 06:19:19

标签: node.js angular

我正在尝试运行以下命令:ng build --target=production --base-href / 但这给了我以下错误:

  

错误:无法确定Architect命令的项目或目标。       在MergeMapSubscriber._loadWorkspaceAndArchitect.pipe.operators_1.concatMap   [作为项目]   (C:\ training \ angular4 \ angular-reddit \ node_modules \ @angular \ cli \ models \ architect-command.js:70:27)       在MergeMapSubscriber._tryNext(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ operators \ mergeMap.js:65:27)       在MergeMapSubscriber._next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ operators \ mergeMap.js:55:18)       在MergeMapSubscriber.Subscriber.next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ Subscriber.js:64:18)       在TapSubscriber._next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ operators \ tap.js:62:26)       在TapSubscriber.Subscriber.next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ Subscriber.js:64:18)       在MergeMapSubscriber.notifyNext(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ operators \ mergeMap.js:84:26)       在InnerSubscriber._next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ InnerSubscriber.js:25:21)       在InnerSubscriber.Subscriber.next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ Subscriber.js:64:18)       在MapSubscriber._next(C:\ training \ angular4 \ angular-reddit \ node_modules \ rxjs \ internal \ operators \ map.js:52:26)

我是Angular的新手。谁能帮我吗?

1 个答案:

答案 0 :(得分:0)

在angular 6版本中,-target 替换为-configuration -c

使用以下命令,

ng build --c=production --base-href /

OR

ASP.NET MVC