Problem
The braid binary only runs through tsx inside the monorepo. The compiled-binary path is broken:
packages/cli/bin/braid.mjs imports dist/main.js.
dist/main.js imports @braidhq/server, which the workspace resolves to packages/server/src/index.ts, whose ESM specifiers point at ./app.js (compiled output that is never emitted).
node packages/cli/dist/main.js --help therefore fails with ERR_MODULE_NOT_FOUND: .../packages/server/src/app.js.
The only working invocation is pnpm --filter @braidhq/cli exec tsx src/main.ts <command>, so braid cannot go on PATH via pnpm link --global, and the package cannot be published as a working CLI.
Deliverable
A build step that compiles the CLI's runtime dependency graph to dist so bin/braid.mjs -> dist/main.js runs under plain node:
braid init, serve, dev, and workspace list all run from the compiled dist.
pnpm link --global (and an eventual publish) yield a working braid on PATH.
Notes
bin/braid.mjs already anticipates this: "Until the build pipeline emits dist/ (next phase)".
- Standalone
braid dev still has no bundled Studio dist and only runs the server; that is a separate concern.
Problem
The
braidbinary only runs throughtsxinside the monorepo. The compiled-binary path is broken:packages/cli/bin/braid.mjsimportsdist/main.js.dist/main.jsimports@braidhq/server, which the workspace resolves topackages/server/src/index.ts, whose ESM specifiers point at./app.js(compiled output that is never emitted).node packages/cli/dist/main.js --helptherefore fails withERR_MODULE_NOT_FOUND: .../packages/server/src/app.js.The only working invocation is
pnpm --filter @braidhq/cli exec tsx src/main.ts <command>, sobraidcannot go on PATH viapnpm link --global, and the package cannot be published as a working CLI.Deliverable
A build step that compiles the CLI's runtime dependency graph to
distsobin/braid.mjs -> dist/main.jsruns under plainnode:braid init,serve,dev, andworkspace listall run from the compileddist.pnpm link --global(and an eventual publish) yield a workingbraidon PATH.Notes
bin/braid.mjsalready anticipates this: "Until the build pipeline emits dist/ (next phase)".braid devstill has no bundled Studio dist and only runs the server; that is a separate concern.