Netlify deploy with --no-build flag is still building edge functions
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- build-system, cli
Línea de trabajo
Comienza con la ruta netlify deploy --no-build y el paso de bundling de Edge Functions; reproduce el problema usando netlify build, elimina la carpeta dist del paquete de Edge Function y luego haz el deploy. Se considera terminado cuando deploy reutiliza los artefactos de Edge Function ya generados sin volver a ejecutar el bundler ni requerir los archivos dist del source y del workspace.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Expected behavior
According to the Netlify CLI documentation for netlify deploy:
--no-buildDo not run build command before deploying. Only use this if you have no need for a build or your project has already been built.
When running:
netlify build
successfully bundles Edge Functions and places artifacts (.netlify/edge-functions/or similar)netlify deploy --no-build
should only upload already-built assets + already-bundled Edge Functions without re-running any bundling
Observed behavior
Even with --no-build, the CLI still runs the Edge Functions bundler:
⠋ Bundling edge functions...
✘ [ERROR] Could not resolve "[REDACTED]"
[REDACTED]:
1 │ import * as mod from "[REDACTED]";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The module "./dist/index.js" was not found on the file system:
[REDACTED]:
11 │ "default": "./dist/index.js"
╵ ~~~~~~~~~~~~~~~~~
You can mark the path "[REDACTED]" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
This fails because:
- The bundler is looking for source files and/or workspace-internal
dist/artifacts that were produced during the earliernetlify build/ monorepo build step. - Those files are not present (or not visible) in the clean GitLab CI job for the deploy stage.
- This forces us to either:
- Artifact-upload all internal
dist/folders from every workspace/package used by Edge Functions
This is very messy & results in large artifacts - Or give up on separating build & deploy and run full build again in the deploy job (loses the separation benefit)
- Artifact-upload all internal
Why this matters (business / DX impact)
- In monorepos with many packages, bundling internal
dist/folders into artifacts just to satisfy the Edge Functions bundler is inefficient and error-prone. - It defeats one of the main advertised benefits of
--no-build: clean separation of build & deploy for faster / more predictable CI, especially on large repos. - Regular (non-edge) Functions appear to respect
--no-buildmuch better (pre-zipped bundles are reused).
Steps to reproduce
- Create a new monorepo where you add a separate Edge Function in a package
- Include the Edge Function within the application
- Run
netlify build - Remove the
distfolder of the Edge Function package - Run
netlify deploy - See that it can't find the necessary files to create the Edge Function bundle
Configuration
[build]
publish = "dist" # or wherever your publish dir is
command = "turbo run build" # or similar monorepo build command
[[edge_functions]]
path = "/*"
function = "my-function"
Environment
System:
OS: macOS 15.7.3
CPU: (12) arm64 Apple M4 Pro
Memory: 196.92 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.22.0 - /Users/pvanmeijgaard/.local/state/fnm_multishells/11669_1770277129243/bin/node
npm: 10.9.4 - /Users/pvanmeijgaard/.local/state/fnm_multishells/11669_1770277129243/bin/npm
pnpm: 10.28.1 - /Users/pvanmeijgaard/.local/state/fnm_multishells/11669_1770277129243/bin/pnpm
bun: 1.3.7 - /opt/homebrew/bin/bun
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.9k
- Forks
- 480
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 66
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de netlify/cli
-
db-status.test fails if the database is disabledPosiblemente ocupada @paulleephp la tomó hoy. Abiertotype: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
`client-ip` is not an IP address when `x-forwarded-for` holds a list or a portPosiblemente ocupada @Dev-next-gen la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
`netlify dev` with `--cwd` from outside the project: every function 500s with "module is not defined in ES module scope" (`detectZisiBuilder` passes a string to `readPackageUp`)Posiblemente ocupada @bsplatt92 la tomó hace 62 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area: command: deploy area: docs type: feature
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
netlify/cli#1984 · 19 comentarios · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
type: bug
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
Los mantenedores suelen responder en 1 día
Todos los issues de netlify/cli
Issues similares
-
bug priority: P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
wayfinder:task
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
bug customer-reported data-plane question Service Attention Storage
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Azure/azure-rest-api-specs#47397 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensPosiblemente ocupada @DavyMassoneto la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
diegosouzapw/OmniRoute#17109 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
paperclipai/paperclip#16785 ·
Los mantenedores suelen responder en 1 día