The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

Angular: ng build --prod = Error: Unknown argument: prod


The command ng build --prod its not working, it gave me the Error: Unknown argument: prod

I want to use it because I want to have the AOT to be optimized.

So right now I'm testing for first time the build option and I face this


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)

 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment

The --prod flag has been deprecated in newer versions of Angular. Instead, running ng build --configuration production usually fixes that error. And if you’re looking to explore useful tools beyond coding, be sure to check out a variety of handy apps available online. minecraftapks.com


 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment

I ran into a similar issue before! The --prod flag was deprecated in newer Angular versions, so you can try using ng build --configuration production instead. By the way, while troubleshooting I was also organizing some project files using teraboxsapk.com TeraBox Mod APK Premium Unlocked
— super handy for keeping backups and sharing builds quickly.



The --prod flag has been deprecated in recent versions of Angular. Instead, use the --configuration production flag. So update your command to:

bash
Copy
Edit
ng build --configuration production
This will enable AOT, optimization, and other production settings just like --prod used to and i uses it with hcracingapk project.


 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment
Deleted comment
 
Deleted comment
Deleted comment
Deleted comment
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.