From 48bf51d52280fafc387a9f81608f3e40c5a93468 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Tue, 24 Feb 2026 21:05:07 +0900 Subject: [PATCH] fix: run pnpm install before ibazel to ensure dependencies are available serveAdev() was calling ibazel directly without ensuring node_modules were installed first. This caused "Command 'ibazel' not found" error when pnpm start was run without prior pnpm install in build directory. --- tools/lib/adev.ts | 4 +++- tools/watch.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/lib/adev.ts b/tools/lib/adev.ts index a443fe3fba..516987b8a3 100644 --- a/tools/lib/adev.ts +++ b/tools/lib/adev.ts @@ -24,8 +24,10 @@ export async function buildAdev() { } } -export function serveAdev() { +export async function serveAdev() { const sh = $$({ cwd: buildDir, reject: false }); + // Ensure dependencies are installed before running ibazel + await $$({ cwd: buildDir })`pnpm install --frozen-lockfile`; const p = sh`pnpm ibazel run //adev:build.serve`; const pid = p.pid!; consola.log(`adev process started: ${pid}`); diff --git a/tools/watch.ts b/tools/watch.ts index 2befae1c41..26f6d06afa 100644 --- a/tools/watch.ts +++ b/tools/watch.ts @@ -35,7 +35,7 @@ async function watch() { const fileWatcher = watchLocalizedFiles(); consola.start('Start adev server...'); - const adevServer = serveAdev(); + const adevServer = await serveAdev(); const shutdown = () => { consola.info('Shutting down...');