Error: unknown argument: prod in “ng build –prod –aot” – Code Example

Total
0
Shares

Angular throws Error: unknown argument: prod if you try to run ng build --prod --aot because prod is deprecated in Angular 12 and removed in Angular 14. The solution is to use --configuration production attribute.

Solution with Code Example

Use this command –

ng build --configuration production --aot

This will solve your issue of Error: unknown argument: prod in Angular.