Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular Cli - How do I rebuild my project

Tags:

angular-cli

How do I rebuild my project in Angular. I build it first with ng build, yet cannot perform that command again as it wont let me change the folder.

I get this error message : EPERM: operation not permitted, lstat

Is there another command such as ng build update ?

like image 383
Jacques Joseph Heffernan Avatar asked Dec 20 '16 16:12

Jacques Joseph Heffernan


People also ask

What command is responsible for rebuilding and launching the Angular application using CLI?

When you use the ng serve command to build an application and serve it locally, the server automatically rebuilds the application and reloads the page when you change any of the source files.

What happens after running ng build command?

ng build is the command you use when you're ready to build your application and deploy it. The CLI will analyze the application and build the files, all while optimizing the application as best as it can.


1 Answers

You can delete the output path before the build with:

ng build --delete-output-path

You can also use one of the alias such as:

ng build --deleteOutputPath

or

ng build -dop

Tested with Angular CLI 1.6.5 and Angular 5.2.1

like image 54
Ortomala Lokni Avatar answered Jan 02 '23 13:01

Ortomala Lokni