From 636e40a9911789b624b6be6e48a86acedaf2d86a Mon Sep 17 00:00:00 2001 From: Askhz <1361267452@qq.com> Date: Sun, 10 May 2026 00:35:18 +0800 Subject: [PATCH] fix: move undici to dependencies to fix Node.js startup hang when https_proxy is set When https_proxy is configured, configureGlobalAgents() calls __require("undici") synchronously. In the npm package, undici was listed as devDependencies and thus absent from node_modules after installation. Node.js 22 would then attempt to load its built-in ESM undici via CJS require(), causing an ESM/CJS interop deadlock that hung the process indefinitely with no way to interrupt it. Moving undici to dependencies ensures it is installed as a CJS-compatible module, allowing __require("undici") to resolve correctly under Node.js. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d4a1b00c..1aeb96e22 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "@agentclientprotocol/sdk": "^0.19.0", "@claude-code-best/mcp-chrome-bridge": "^2.0.8", "ws": "^8.20.0", - "gray-matter": "^4.0.3" + "gray-matter": "^4.0.3", + "undici": "^7.24.6" }, "devDependencies": { "@alcalzone/ansi-tokenize": "^0.3.0",