`cf migrate` fails with `ERR_PNPM_IGNORED_BUILDS` in a pnpm workspace that has not approved workerd
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
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- build-system, cli
Línea de trabajo
Read the cf migrate install path in installProjectDependencies from @cloudflare/codemods, then compare it with the build approval handling added for cf init and @cloudflare/autoconfig. Reproduce with the provided pnpm workspace and check pnpm-workspace.yaml behavior for existing entries, explicit false decisions, and --dry-run. Done means migration approves required builds before installing, or skips installation with clear approval guidance, without leaving a throwing generated config.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary of the issue
In a pnpm workspace whose pnpm-workspace.yaml does not approve workerd's build script, cf migrate writes cloudflare.config.ts and then fails when it installs cf. pnpm 12 rejects the install because workerd, a dependency of cf, has an unapproved build script. cf migrate exits with code 1 and writes throw new Error("Migration incomplete. …") into the generated cloudflare.config.ts.
cf init handles this since #92 (fixed in #136), and cloudflare/workers-sdk#16035 (PR cloudflare/workers-sdk#16054) adds the same approvals to @cloudflare/autoconfig. cf migrate installs through installProjectDependencies in @cloudflare/codemods, which neither change covers. @cloudflare/codemods 0.7.3, the version on main, has no build-approval step either.
Expected behaviour
When cf migrate installs with pnpm, it approves the builds that cf needs (workerd) in the active pnpm-workspace.yaml before it installs, as cf init does. It keeps existing entries and explicit false decisions, and writes nothing on --dry-run. If cf migrate cannot approve the builds, it skips the install and says which builds to approve, instead of writing a config that throws.
Version of cf used
1.0.0-beta.27
System information and package versions
System:
OS: macOS 27.0
CPU: (14) arm64 Apple M4 Pro
Memory: 412.20 MB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 26.13.0 - ~/.local/share/fnm/node-versions/v26.13.0/installation/bin/node
npm: 11.20.0 - ~/.local/share/fnm/node-versions/v26.13.0/installation/bin/npm
pnpm: 12.16.1 - /opt/homebrew/bin/pnpm
bun: 1.4.4 - /opt/homebrew/bin/bun
Deno: 2.9.8 - /opt/homebrew/bin/deno
Watchman: 2026.10.26.00 - /opt/homebrew/bin/watchman
npmPackages:
cf: 1.0.0-beta.27 => 1.0.0-beta.27
Reproduction (optional)
- Create these files:
package.json:{ "name": "cf-migrate-pnpm-repro", "private": true }pnpm-workspace.yaml:packages: ["apps/*"](noallowBuilds)apps/worker/package.json:{ "name": "worker", "private": true, "type": "module" }apps/worker/wrangler.jsonc:{ "name": "worker", "main": "src/index.js", "compatibility_date": "2026-11-01" }apps/worker/src/index.js:export default { fetch() { return new Response("Hello"); } };
- Run
pnpm installat the root. - In
apps/worker, runpnpm dlx cf@latest migrate.
cf migrate exits with code 1. cloudflare.config.ts contains the throw, and pnpm-workspace.yaml is unchanged.
Workaround: approve workerd first (allowBuilds: { workerd: true } in pnpm-workspace.yaml), then cf migrate completes and writes no throw. Or run cf migrate --no-install and install cf yourself.
Relevant error logs (optional)
Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.
Updated 3 file(s):
├─ cloudflare.config.ts
├─ package.json
└─ ../../pnpm-lock.yaml
Follow-up work:
└─ [required] The generated configuration was written, but `cf` could not be installed automatically. Install `cf@latest` with your package manager before using it. Installation failed: …
devDependencies:
+ cf 1.0.0-beta.27
Error: ERR_PNPM_IGNORED_BUILDS
× adding a new package
╰─▶ Ignored build scripts: [email protected]
help: Run "pnpm approve-builds" to pick which dependencies should be allowed
to run scripts.
⚠ Migration requires follow-up work.
- Lenguaje dominante
- TypeScript
- Estrellas
- 993
- Forks
- 65
- Merge medio
- 21 h 40 min
- PR fusionados (30 d)
- 211
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 cloudflare/cf
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudflare/cf#344 ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/cf#262 ·
Los mantenedores suelen responder en 1 día
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePosiblemente ocupada @jamesopstad la tomó hace 23 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/cf#223 · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cloudflare/cf#179 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
cloudflare/cf#510 ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudflare/cf
Issues similares
-
area: web bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
kinqsradio/orbyn-engineering#227 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
joeldesante/TurfBuilder#258 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ncecere/open-mcp-portal#85 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
loathers/garbage-collector#2865 ·
Los mantenedores suelen responder en 1 día
-
test-reliability
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure/azure-sdk-for-js#40672 · 1 reacción ·
Los mantenedores suelen responder en 1 día