When i try to build angular app using azure devops and deploy to azure static web app i'm receiving below error
The app build failed to produce artifact folder: 'dist/harmony-front'. Please ensure this property is configured correctly in your deployment configuration file.
I tried by changing output_location to / , dist, /dist , dist/harmony-front,
nothing seems to work
here's the yaml code for the deployment section
- task: AzureStaticWebApp@0
inputs:
app_location: "/"
api_location: "api"
output_location: "./dist/harmony-front"
app_build_command: 'npm run build:prod'
skip_api_build: true
verbose: true
env:
continueOnError: true
CUSTOM_BUILD_COMMAND: "npm install --force"
azure_static_web_apps_api_token: $(deployment_token)
What was the mistake i made
Thanks
Actually I found the issue and will post for future reference. if someone had the same issue.
issue start when you override build command using CUSTOM_BUILD_COMMAND
will overwrite the RUN_BUILD_COMMAND
so based on the comment of the issue posted on Github instead of npm install --force
command combined with build like npm install --force && npm run build
works like charm