From aeeacf17d567b4128afd4c5f207d42700602cf30 Mon Sep 17 00:00:00 2001 From: Spooks444 <193448029+Spooks444@users.noreply.github.com> Date: Tue, 14 Jul 2026 04:39:21 -0500 Subject: [PATCH] fix(build): externalize socks + sharp in node-server bundle Bun's bundler refused to inline socks and sharp (both ship .node native addons), so the Windows node-server build failed with 'Could not resolve: socks / sharp'. Added --external socks and --external sharp to browse/scripts/build-node-server.sh, matching the script's own documented rule for .node-addon deps. Verified: bash build-node-server.sh -> exit 0, emits server-node.mjs; bun run build -> exit 0 (all 6 artifacts compile). --- browse/scripts/build-node-server.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browse/scripts/build-node-server.sh b/browse/scripts/build-node-server.sh index 3ab652ac0..7141ae477 100755 --- a/browse/scripts/build-node-server.sh +++ b/browse/scripts/build-node-server.sh @@ -26,7 +26,9 @@ bun build "$SRC_DIR/server.ts" \ --external playwright-core \ --external diff \ --external "bun:sqlite" \ - --external "@ngrok/ngrok" + --external "@ngrok/ngrok" \ + --external socks \ + --external sharp # Step 2: Post-process # Replace import.meta.dir with a resolvable reference