Unknown Argument --Prod Angular Error Solved




Are you tired of encountering errors when building your Angular projects for production? If so, you're in the right place! In this tutorial, we'll be discussing how to solve the 'unknown argument –production' error that occurs when building an Angular project for production.


If you've encountered this error, you may be wondering what went wrong. The answer is simple: the command '--prod' has been deprecated in Angular 12 and removed in Angular 14. As a result, you'll need to replace the deprecated command with
ng build --configuration production
when building your project for production.

To solve this error, follow the steps below:

Step 1: Open your Angular project in your preferred code editor.

Step 2: Navigate to the terminal and type in the following command:

ng build --configuration production


Step 3: Press enter to execute the command.

By following these steps, you should be able to build your Angular project for production without encountering the 'unknown argument –production' error.

If you found this tutorial helpful, please consider giving it a thumbs up and subscribing to our channel to show your support. Our mission is to help developers like you solve problems and build amazing projects. Thanks for watching, and we'll see you in the next tutorial. Take care and have a great day!

Post a Comment

0 Comments