angularangular-devkit

EEXIST: file already exists angular-cli buid


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

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


Solution

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

    See angular build docs