From e43541d38ba9c0c5316a78aee8b3ea7dfee081d0 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Sat, 5 Sep 2026 14:43:52 +0300 Subject: [PATCH] fix(tooling): resolve Bun in the full dev launcher dev-web-full.mjs is started by node and spawned bare `bun`, so on Windows machines where npm exposes only bun.cmd both children died with ENOENT and `dev:web:full` never started. It now uses the resolver dev-web-hmr.mjs got, and hides the console window like the other Node-spawned children. --- scripts/dev-web-full.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/dev-web-full.mjs b/scripts/dev-web-full.mjs index 7f8bc635..5307475b 100644 --- a/scripts/dev-web-full.mjs +++ b/scripts/dev-web-full.mjs @@ -3,10 +3,13 @@ import { spawn } from 'node:child_process'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; +import { resolveBunExecutable } from './lib/bun-executable.mjs'; + const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const repoRoot = path.resolve(__dirname, '..'); const useDetachedChildren = process.platform === 'darwin' || process.platform === 'linux'; +const bunExecutable = resolveBunExecutable(); function run(label, command, args, options = {}) { const child = spawn(command, args, { @@ -14,6 +17,7 @@ function run(label, command, args, options = {}) { stdio: ['inherit', 'pipe', 'pipe'], env: { ...process.env }, detached: useDetachedChildren, + windowsHide: true, ...options, }); @@ -160,7 +164,7 @@ function waitForFirstBuildSuccess(buildChild) { let shuttingDown = false; let api = null; -const build = run('build', 'bun', ['run', '--cwd', 'packages/web', 'build:watch']); +const build = run('build', bunExecutable, ['run', '--cwd', 'packages/web', 'build:watch']); async function shutdown(exitCode = 0) { if (shuttingDown) return; @@ -193,7 +197,7 @@ waitForFirstBuildSuccess(build) return; } console.log('[dev:web:full] Initial frontend build ready, starting API watcher...'); - api = run('api', 'bun', ['run', '--cwd', 'packages/web', 'dev:server:watch']); + api = run('api', bunExecutable, ['run', '--cwd', 'packages/web', 'dev:server:watch']); api.on('exit', onChildExit('api')); }) .catch((error) => {