Azure / Azure/static-web-apps

Function language detection error leads to deploy failure

Open
#1,206 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Static web app (Vite/VueJs) + Azure functions deployment fails with error (presumably from Oryx)

Error:
```
The function language detected is unsupported or invalid. The following languages are valid: dotnet, dotnetisolated, node, python. If you are not using Azure Functions, you can skip this check by removing the 'api_location' input from the workflow file.
```

A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a static web app using VueJs
2. Add a Azure cloud function
3. Generate the workflow file
4. Upload to github actions
5. See error in deploy log

- Our GitHub Actions or Azure Pipelines workflow YAML file

```
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

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
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LIVELY_POND_0F8C8B91E }}
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: "/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "dist" # Built app content directory - optional
###### 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: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_LIVELY_POND_0F8C8B91E }}
action: "close"
```

**Expected behavior**
App should deploy with functions alongside (this previously worked, even this morning).

Note: The repository is private but I'm happy to assist by providing logs and attempting changes.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.