Skip to content

Commit 7ac4e2f

Browse files
committed
fix(cli): bundle js-yaml into CLI dist to prevent ERR_MODULE_NOT_FOUND on npx
## Intent When the CLI wizard is run via `npx @codemcp/workflows-cli`, the root package that npx installs does not include js-yaml as a transitive dependency visible at runtime. The wizard reads .vibe/config.yaml using js-yaml at startup, which causes an ERR_MODULE_NOT_FOUND crash. ## Key decisions - Added 'js-yaml' to the noExternal list in tsup.config.ts so it is inlined into the bundle at build time, making the CLI self-contained regardless of what the npx install resolution picks up - js-yaml is already declared in the package's dependencies (so it is present during the build); this change only affects the output bundling, not the dependency graph
1 parent 6091a1a commit 7ac4e2f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

packages/cli/tsup.config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ export default defineConfig({
99
clean: true,
1010
bundle: true,
1111
external: ['@modelcontextprotocol/sdk'],
12-
noExternal: ['@codemcp/workflows-core', '@codemcp/workflows-server'],
12+
noExternal: [
13+
'@codemcp/workflows-core',
14+
'@codemcp/workflows-server',
15+
// js-yaml is imported at runtime in the chunk (via the .vibe/config.yaml
16+
// YAML parser). It is declared in this package's `dependencies` but NOT
17+
// in the published root package.json, so `npx` does not install it and
18+
// the wizard fails with `ERR_MODULE_NOT_FOUND: js-yaml`. Bundling it
19+
// into the chunk makes the wizard self-contained.
20+
'js-yaml',
21+
],
1322
target: 'node20',
1423
sourcemap: false,
1524
});

0 commit comments

Comments
 (0)