Edge functions silently skipped when running from a workspace package

未关闭
#10,266 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
build-system, cli

调研方向

Start by tracing how the CLI passes packagePath and the working directory into @netlify/build, then find the code that resolves .netlify/v1/edge-functions and the tests for workspace builds. Reproduce with netlify build in apps/web from the linked repro. Done means the edge function is bundled and .netlify/edge-functions-dist is produced when invoked from a workspace package.

由索引模型根据 Issue 内容生成。

描述

Bug

In a pnpm workspace, running netlify build or netlify deploy from a package directory skips bundling for functions in .netlify/v1/edge-functions. There's no warning, and the deploy succeeds without edge functions. Serverless functions still deploy.

It works from the workspace root with --filter, and in standalone projects.

Reproduce

Repro: https://github.com/shamilkotta/netlify-edge-monorepo-repro

Run netlify build in apps/web.

Expected: hello is bundled.

Actual: the build completes with packagePath: apps/web, but there's no "Edge Functions bundling" step and no .netlify/edge-functions-dist.

Likely cause

packagePath is set while the build's working directory stays in the package, so resolve(buildDir, packagePath, ".netlify/v1/edge-functions") appears to point at apps/web/apps/web/....

Environment

netlify-cli 27.11.1, @netlify/build 37.4.0, Node 24.13.0, macOS

Related: #7702

主要语言
TypeScript
星标
1.9k
派生
482
平均合并
2 天 13 小时
30 天内合并 PR
77

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

netlify/cli 的其他 Issue

查看 netlify/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。