Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find a default file in the app artifacts folder. Valid default files: index.html,Index.html. #1521

Open
averylytle opened this issue Jul 31, 2024 · 0 comments

Comments

@averylytle
Copy link

averylytle commented Jul 31, 2024

Describe the bug

I'm receiving the following error: Failed to find a default file in the app artifacts folder (dist/kidztownwebapp.client). Valid default files: index.html,Index.html.

I'm trying to deploy an Angular 18 application with a .NET Core 8 backend, so my project is set up like this: I have a client app folder that holds the Angular application (kidztownwebapp.client) and an API folder for the backend (KidzTownWebApp.Server).

I noticed my dist folder actually pushes the index.html file to dist/kidztownwebapp.client/browser. I changed my angular.json outputPath to "dist/kidztownwebapp.client/browser" and updated my .yml foloder output_location to match it "dist/kidztownwebapp.client/browser" but I still get the same error.

I also tried leaving the output_location empty and putting skip_app_build: true and skip_api_build: true, but it still didn't work.

  • staticwebapp.config.json file
    {
    "platform": {
    "apiRuntime": "node:18"
    }

}

YML File:
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master
YML file:
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
###### check-latest: true ---will download latest, has performance issues
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ my secret here }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "kidztownwebapp.client/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "dist/kidztownwebapp.client/browser" # Built app content directory - optional
#skip_api_build: true #AML remove if needed to be built through yml
#skip_app_build: true #AML remove if needed to be built through yml
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ [REMOVED]}}
action: "close"

Expected behavior
This part of the build step should clear.

Screenshots
Screenshot 2024-07-31 121239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant