From 88289766249f198137aa5e0944ab710f45e4eb09 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sat, 1 Aug 2026 18:20:33 +0000 Subject: [PATCH] fix(build): revert undici to ^7 (incompatible with Bun build runtime) undici 8.x unconditionally destructures `markAsUncloneable` from `node:worker_threads` (lib/web/webidl/index.js), but Bun's `node:worker_threads` does not export that symbol. Since the Docker build stage runs `bun run build`, undici is evaluated under Bun during Next.js "Collecting page data" for /v1/[...route], throwing: TypeError: s.util.markAsUncloneable is not a function Error: Failed to collect page data for /v1/[...route] undici 7.x guards the same call behind a runtime-feature check and falls back to a no-op, so it loads cleanly under Bun while preserving every API the proxy uses (Agent, ProxyAgent, request, fetch, setGlobalDispatcher). Re-upgrading to undici 8 should wait until either Bun ships `markAsUncloneable` or the build stage switches to Node >= 23. CI Run: https://github.com/ding113/claude-code-hub/actions/runs/30711830763 Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b8dadac8..71bee871d 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "tailwind-merge": "^3.6.0", "timeago.js": "^4.0.2", "tw-animate-css": "^1.4.0", - "undici": "^8.9.0", + "undici": "^7", "vaul": "^1.1.2", "ws": "^8.21.1", "zod": "^4.4.3"