Bug
scripts/build-node-server.sh fails on Windows with:
error: cannot write multiple output files without an output directory
This means server-node.mjs is never generated, and the browse binary crashes at startup:
error: server-node.mjs not found. Run `bun run build` to generate the Windows server bundle.
Root Cause
The build script uses bun build --outfile dist/server-node.mjs, which writes a single file. On Windows, the ngrok native addon (ngrok.win32-x64-msvc.node, ~10MB) is emitted as a separate asset. Bun refuses to write multiple outputs to a single --outfile.
Fix
Replace --outfile with --outdir + --entry-naming:
- bun build "$SRC_DIR/server.ts" \
- --target=node \
- --outfile "$DIST_DIR/server-node.mjs" \
- --external playwright \
- --external playwright-core \
- --external diff \
- --external "bun:sqlite"
+ bun build "$SRC_DIR/server.ts" \
+ --target=node \
+ --outdir "$DIST_DIR" \
+ --entry-naming server-node.mjs \
+ --external playwright \
+ --external playwright-core \
+ --external diff \
+ --external "bun:sqlite"
This lets bun write both the main bundle and the ngrok native addon to dist/. The rest of the post-processing steps in the script work unchanged.
Environment
- Windows 11
- Bun 1.3.11
- gstack browse skill (latest as of 2026-04-11)
Verified the fix works: browse starts, navigates, and reads pages correctly after rebuilding with --outdir.
Bug
scripts/build-node-server.shfails on Windows with:This means
server-node.mjsis never generated, and the browse binary crashes at startup:Root Cause
The build script uses
bun build --outfile dist/server-node.mjs, which writes a single file. On Windows, the ngrok native addon (ngrok.win32-x64-msvc.node, ~10MB) is emitted as a separate asset. Bun refuses to write multiple outputs to a single--outfile.Fix
Replace
--outfilewith--outdir+--entry-naming:This lets bun write both the main bundle and the ngrok native addon to
dist/. The rest of the post-processing steps in the script work unchanged.Environment
Verified the fix works: browse starts, navigates, and reads pages correctly after rebuilding with
--outdir.