我正在尝试运行以下命令: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的新手。谁能帮我吗?
答案 0 :(得分:0)
在angular 6版本中,-target 替换为-configuration 或 -c
使用以下命令,
ng build --c=production --base-href /
OR
ASP.NET MVC