From 18c01cc0c419634b3dc3c8e9bdbe46b70c4cd4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Fri, 27 Mar 2026 19:14:11 -0400 Subject: [PATCH] fix(cli): force exit after render completes to prevent process hang Node.js keeps the process alive due to lingering HTTP connections from fetch() keep-alive pool (update checks and telemetry). The exit event handler in cli.ts fires flushSync() which spawns a detached child process so telemetry data is not lost. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- packages/cli/src/commands/render.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/cli/src/commands/render.ts b/packages/cli/src/commands/render.ts index a7aea8f8e9..8f64052c6c 100644 --- a/packages/cli/src/commands/render.ts +++ b/packages/cli/src/commands/render.ts @@ -209,6 +209,12 @@ Examples: browserPath, }); } + + // Force exit — Node keeps the process alive due to lingering HTTP + // connections (fetch keep-alive pool from update checks / telemetry). + // The 'exit' event handler in cli.ts fires flushSync() which spawns a + // detached child process so telemetry data is not lost. + process.exit(0); }, });