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
Replies (5)
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
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.