diff --git a/tools/lib/adev.ts b/tools/lib/adev.ts index a443fe3fb..516987b8a 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 2befae1c4..26f6d06af 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...');