我正在尝试运行以下命令: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的新手。谁能帮我?
最佳答案
在angular 6版本中--target用--configuration或-c替换
使用以下命令,ng build --configuration=production --base-href /
要么ng build --c=production --base-href /
关于node.js - 无法确定Architect命令angular4的项目或目标,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51998562/