Skip to content

Commit 49a3135

Browse files
authored
fix: run pnpm install before ibazel to ensure dependencies are available (#1149)
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.
1 parent 9f5563e commit 49a3135

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tools/lib/adev.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ export async function buildAdev() {
2424
}
2525
}
2626

27-
export function serveAdev() {
27+
export async function serveAdev() {
2828
const sh = $$({ cwd: buildDir, reject: false });
29+
// Ensure dependencies are installed before running ibazel
30+
await $$({ cwd: buildDir })`pnpm install --frozen-lockfile`;
2931
const p = sh`pnpm ibazel run //adev:build.serve`;
3032
const pid = p.pid!;
3133
consola.log(`adev process started: ${pid}`);

tools/watch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function watch() {
3535
const fileWatcher = watchLocalizedFiles();
3636

3737
consola.start('Start adev server...');
38-
const adevServer = serveAdev();
38+
const adevServer = await serveAdev();
3939

4040
const shutdown = () => {
4141
consola.info('Shutting down...');

0 commit comments

Comments
 (0)