0

When I try to execute ng build in -prod mode with --output-path flag

I am getting this error EEXIST: file already exists, mkdir

Below mentioned are my Environment configurations

  • angular/cli version 7.3.8
  • angular-devkit/build-angular 0.13.9
  • node 10.15.3 (npm 6.4.1)

I found this github issue link which refers to recent permission issue in transferring the built bundle folder to specified --ouput-path but the fix is made in angular 8 latest version.

Can someone guide me through to make the build work

Keshan Nageswaran
  • 8,060
  • 3
  • 28
  • 45

2 Answers2

1

Try to add the --deleteOutputPath true. This will make sure the output path is deleted before building.

See angular build docs

Norbert Bartko
  • 2,468
  • 1
  • 17
  • 36
0

In my case I was trying to compile typescript and deleting .build in the project did the trick.

Victor Basso
  • 5,556
  • 5
  • 42
  • 60