Edge functions silently skipped when running from a workspace package

Abierto
#10,266 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript
Área
build-system, cli

Línea de trabajo

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.

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

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
1.9k
Forks
482
Merge medio
2 d 13 h
PR fusionados (30 d)
77

Preparar el entorno

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 netlify/cli

Todos los issues de netlify/cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.