garrytan/gstack · error · Error
server-node.mjs not found. Run `bun run build` to generate t
Error message
server-node.mjs not found. Run `bun run build` to generate the Windows server bundle.
What it means
Error "server-node.mjs not found. Run `bun run build` to generate the Windows server bundle." thrown in garrytan/gstack.
Source
Thrown at browse/src/cli.ts:87
if (!metaDir.includes('$bunfs')) {
const distScript = path.resolve(metaDir, '..', 'dist', 'server-node.mjs');
if (fs.existsSync(distScript)) return distScript;
}
// Compiled binary: browse/dist/browse → browse/dist/server-node.mjs
if (execPath) {
const adjacent = path.resolve(path.dirname(execPath), 'server-node.mjs');
if (fs.existsSync(adjacent)) return adjacent;
}
return null;
}
const NODE_SERVER_SCRIPT = IS_WINDOWS ? resolveNodeServerScript() : null;
// On Windows, hard-fail if server-node.mjs is missing — the Bun path is known broken.
if (IS_WINDOWS && !NODE_SERVER_SCRIPT) {
throw new Error(
'server-node.mjs not found. Run `bun run build` to generate the Windows server bundle.'
);
}
interface ServerState {
pid: number;
port: number;
token: string;
startedAt: string;
serverPath: string;
binaryVersion?: string;
mode?: 'launched' | 'headed';
/** Hash of (proxyUrl + headed flag), used by D2 daemon-mismatch check. */
configHash?: string;
/** Xvfb child PID for cleanup on disconnect. */
xvfbPid?: number;
xvfbStartTime?: number;
xvfbDisplay?: string;View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at browse/src/cli.ts:87 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/1905622f7c09a003.
Report an issue: GitHub.