Managed Functions deployment consistently fails with "Failed to deploy the Azure Functions" on Free tier — reproducible with zero-dependency function
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- azure, node.js, typescript
调研方向
首先,使用此处描述的最小 API、Free-tier 资源和部署令牌,复现 swa deploy ./dist --api-location ./api 命令。将 API 部署路径与成功的仅前端部署进行比较,并检查 staticwebapp.config.json、host.json 以及生成的 dist/ 内容。完成的标准是确定一个可复现的 CLI 或平台原因,或记录该限制,并用可采取行动的证据替代通用失败信息。
由索引模型根据 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 deploywith 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 cleandist/with one compiled function file andhost.jsonat the API root. - Deploy:
swa deploy ./dist --api-location ./api --deployment-token <token> --env production
Expected
The single trivial function deploys successfully.
Actual
Deployment fails every time, identically:
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=devbefore deploy). - Confirmed not a runtime-version issue (Node 22 is on the documented supported list; explicit
apiRuntimeconfig 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 ./distwithout--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