Ctrl+C leaves `cf dev` stuck at "Terminate batch job (Y/N)?" on Windows in npm projects
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #413 di @Cherry — chiusa senza merge
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- node.js, typescript
- Ambito
- cli, developer-experience
Direzione di ricerca
The report describes cf dev and cf build launching npm.cmd or npx.cmd through cmd.exe on Windows; no source files or tests are named. Start by tracing how the CLI resolves and launches these commands, then reproduce Ctrl+C in an npm project on Windows. Done means the server stops and cf exits without the batch-job prompt; the linked pull request indicates this work is already under way.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary of the issue
On Windows, when cf dev or cf build runs the framework through npm (for example npx astro dev), pressing Ctrl+C stops the dev server but cf doesn't exit. The terminal shows cmd's Terminate batch job (Y/N)? and waits for an answer.
cf resolves npm/npx to the npm.cmd/npx.cmd that ship with Node and runs them through cmd.exe. Unlike the cmd-shim launchers in node_modules\.bin, those two don't end the batch context before starting Node, so cmd asks about the interrupted batch file once npm exits. Running npm run dev directly in PowerShell doesn't hit this because PowerShell uses npm.ps1.
pnpm projects show the same prompt from pnpm's own node_modules\.bin\*.cmd shims, which is outside cf.
Expected behaviour
Ctrl+C stops the dev server and cf exits, the same as on macOS and Linux, and the same as running npm run dev yourself in PowerShell.
Version of cf used
1.0.0-beta.21
System information and package versions
System:
OS: Windows 11 10.0.26300
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 8.60 GB / 31.91 GB
Binaries:
Node: 26.12.0
npm: 11.18.0
pnpm: 12.14.0
Reproduction (optional)
In PowerShell or Windows Terminal, in an npm project cf runs through npx (for example Astro):
cf dev
# wait for the dev server, then press Ctrl+C
The dev server shuts down, then Terminate batch job (Y/N)? appears and cf keeps running until you answer it.
Relevant error logs (optional)
│ Delegating to npx astro dev
...
Terminate batch job (Y/N)?
- Lingua principale
- TypeScript
- Stelle
- 960
- Fork
- 62
- Merge medio
- 23h 17m
- PR unite (30g)
- 220
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cf
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cf#344 ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#262 ·
I maintainer di solito rispondono entro 1 giorno
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templateForse già presa @jamesopstad l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#223 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#179 ·
I maintainer di solito rispondono entro 1 giorno
-
OAuth account-token delegation: five groups non-selectable despite explicit first-party CLI consentAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
cloudflare/cf#433 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/cf
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
b310-digital/teammapper#1515 ·
I maintainer di solito rispondono entro 1 giorno
-
onenote
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
obsidianmd/obsidian-importer#689 ·
-
In a half-screen window, the title bar cuts the workspace and version names until they can't be readApertabug launch local use macOS Windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Integration]: eRPCAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ava-labs/builders-hub#4826 ·
I maintainer di solito rispondono entro 1 giorno
-
记忆分析的默认模型显示与实际使用不一致Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno