Managed Functions deployment consistently fails with "Failed to deploy the Azure Functions" on Free tier - reproducible with zero-dependency function
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
未指定任何仓库文件或测试入口点。首先,在 Free 层级的 Static Web App 上复现文档中所述的 swa deploy ./dist --api-location ./api 情况,然后将其与仅部署前端的成功情况进行比较。当该失败可以通过可复现的解决方案或有文档记录的 Free 层级限制得到解释,并且错误处理更加清晰时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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
- Create a Free-tier Static Web App via az staticwebapp create.
- Create a minimal API with a single HTTP-triggered function, zero dependencies beyond @azure/functions.
- Build it (tsc), producing a clean dist/ with one compiled function file and host.json at the API root.
- 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.
- 主要语言
- 没有语言数据
- 星标
- 347
- 派生
- 68
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/static-web-apps 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Azure/static-web-apps#1764 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
Azure/static-web-apps#1827 ·
-
难度 4/5 3-5 天 新手友好度 35/100
Azure/static-web-apps#1826 · 5 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 42/100
Azure/static-web-apps#1825 ·
-
难度 4/5 3-5 天 新手友好度 18/100
Azure/static-web-apps#1824 ·
查看 Azure/static-web-apps 的全部 Issue
相似的 Issue
-
component/media domain/discovery
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
roadmap/v1.2.0 type/bug
难度 2/5 1-3 小时 新手友好度 68/100
databrickslabs/ontos#1773 ·
维护者通常 2 天内回复
-
bug good first issue help wanted up-for-grabs
难度 2/5 1-3 小时 新手友好度 78/100
ClickHouse/loom#2075 ·
维护者通常 1 天内回复
-
[Bug]: The trt-decoder extra installs TensorRT 11, which the trt_decoder plugin cannot load可能已有人在做 @fedonman 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100