Managed Functions deployment consistently fails with "Failed to deploy the Azure Functions" on Free tier - reproducible with zero-dependency function

Abierto
#1,808 5 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
azure, node.js
Área
api, backend, cloud

Línea de trabajo

No se nombra ningún archivo del repositorio ni ningún punto de entrada de prueba. Empieza reproduciendo el caso documentado swa deploy ./dist --api-location ./api en una Static Web App del nivel Free y, a continuación, compáralo con el despliegue exitoso solo del frontend. Se considerará terminado cuando el fallo quede explicado mediante una resolución reproducible o una restricción documentada del nivel Free, y exista un manejo de errores más claro.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

Every attempt to deploy an API (managed Azure Functions, via swa deploy --api-location) to a Free-tier Static Web App fails with the generic "Failed to deploy the Azure Functions" reason, after a consistent ~16 second delay. Frontend-only deployment (no --api-location) succeeds without issue on the same resource.

Environment

  • Static Web App SKU: Free
  • Region: East US 2 (also tried West Europe / North Europe, both rejected at creation time with "region not accepting new customers" - unrelated to this issue)
  • SWA CLI version: 2.0.10
  • Node.js API, apiVersion: 22 (also tried with explicit "platform": {"apiRuntime": "node:22"} in staticwebapp.config.json - no change)
  • Deployment method: swa deploy with a deployment token (not GitHub Actions)
  • OS: Windows 11

Steps to reproduce

  1. Create a Free-tier Static Web App via az staticwebapp create.
  2. Create a minimal API with a single HTTP-triggered function, zero dependencies beyond @azure/functions.
  3. Build it (tsc), producing a clean dist/ with one compiled function file and host.json at the API root.
  4. Deploy: swa deploy ./dist --api-location ./api --deployment-token --env production

Expected

The single trivial function deploys successfully.

Actual

Deployment fails every time, identically:

i Status: InProgress. Time: 0.66(s)
i Status: Failed. Time: 16.24(s)
i Deployment Failed :(
i Deployment Failure Reason: Failed to deploy the Azure Functions.

Troubleshooting already done

  • Confirmed not a stale-build-artifact issue (clean dist/, verified exact file list before zipping).
  • Confirmed not a bloated/dev-dependency issue (npm prune --omit=dev before deploy).
  • Confirmed not a runtime-version issue (Node 22 is on the documented supported list; explicit apiRuntime config made no difference).
  • Confirmed not specific to one resource instance: fully deleted and recreated the Static Web App, identical failure on the fresh resource.
  • Confirmed not specific to our actual application code: deployed a single-endpoint function with zero dependencies beyond @azure/functions, identical failure.
  • Frontend-only deployment (same resource, swa deploy ./dist without --api-location) succeeds cleanly every time.
  • Azure Portal's Activity Log shows no entry corresponding to this failure (deployment appears to go through a non-ARM data-plane path not captured there).
  • Azure Portal's "Diagnose and solve problems" tool for the resource did not surface anything more specific.

This strongly suggests either a platform-side issue specific to this subscription/tier combination, or an undocumented restriction on managed Functions for Free-tier Static Web Apps that isn't reflected in current error messaging.

Lenguaje dominante
Sin datos de lenguaje
Estrellas
347
Forks
68
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/static-web-apps

Todos los issues de Azure/static-web-apps

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.