From 78a8c665e88ad39a1c0977d9f001fdb1bc6f1624 Mon Sep 17 00:00:00 2001 From: Aaron Queen Date: Tue, 8 Sep 2026 02:25:36 -0600 Subject: [PATCH] fix(build): build the ui workspace by directory, not --workspace Bun rewrites `npm run` to `bun run` inside a script, and bun ignores --workspace, so `npm run build --workspace ui` re-entered the ROOT build and recursed until it died. The build is unusable under bun; npm is unaffected, which is why it went unnoticed. `cd ui && npm run build` names the workspace by directory and does the same thing under either runtime. build:lib had the same shape and the same fix; its script already expects ui as its cwd. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d5a742420..c8b935bb6 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ ], "scripts": { "build": "tsc && npm run copy-assets && npm run build:ui && node -e \"require('fs').chmodSync('dist/bin/codegraph.js', 0o755)\"", - "build:ui": "npm run build --workspace ui && node scripts/check-ui-build.mjs", - "build:lib": "npm run build:lib --workspace ui", + "build:ui": "cd ui && npm run build && cd .. && node scripts/check-ui-build.mjs", + "build:lib": "cd ui && npm run build:lib", "preuninstall": "node dist/bin/uninstall.js", "copy-assets": "node -e \"const fs=require('fs');fs.mkdirSync('dist/db',{recursive:true});fs.copyFileSync('src/db/schema.sql','dist/db/schema.sql');fs.mkdirSync('dist/extraction/wasm',{recursive:true});fs.readdirSync('src/extraction/wasm').filter(f=>f.endsWith('.wasm')).forEach(f=>fs.copyFileSync('src/extraction/wasm/'+f,'dist/extraction/wasm/'+f))\"", "dev": "tsc --watch",