简体   繁体   English

无法将--prod --aot标志传递给ng build

[英]Unable to pass --prod --aot flags to ng build

I'm unable to pass flags to ng build. 我无法将标志传递给ng build。

I have next line: "build:aot:prod": "node --max_old_space_size=8092 ./node_modules/@angular/cli/bin/ng build --aot --prod" 我有下一行:“ build:aot:prod”:“ node --max_old_space_size = 8092 ./node_modules/@angular/cli/bin/ng build --aot --prod”

it runs only ng build without flags. 它只运行不带标志的ng build。 What can be wrong? 有什么事吗

Try to change the position of flags. 尝试更改标志的位置。 Change ng build --aot --prod to ng build --prod --aot . ng build --aot --prod更改为ng build --prod --aot Same issue exists on GitHub . GitHub上存在相同的问题。

Here is your complete line: 这是您的完整行:

"build:aot:prod": "node --max_old_space_size=8092 ./node_modules/@angular/cli/bin/ng build --prod --aot"

将软件包更新到最新版本和npm本身后-可根据需要工作。

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

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