Commit 94de6f0
committed
Fix npx install for Claude Code v2.1.112
Four bugs prevented `npx beastmode install` from producing a working
plugin on a clean Claude Code installation:
1. `.claude-plugin/` missing from `files` in package.json — npm strips
it from the tarball even when fetching from GitHub, causing
plugin-copier to fail with ENOENT.
2. index.mjs exits with code 1 on install failure but never prints the
error message — users see only the version banner.
3. config-merger.mjs writes `source.name` in known_marketplaces.json
but Claude Code's Zod schema requires `source.package`.
4. config-merger.mjs uses `source: "npm"` which Claude Code v2.1.112
hasn't implemented. Additionally, plugin-copier writes
marketplace.json to the wrong location (Claude Code expects it in a
`.claude-plugin/` subdirectory) and the `./plugin` relative source
path doesn't resolve.
Fixes: include `.claude-plugin/` in package files, print install errors,
use `source: "directory"` instead of `source: "npm"`, write
marketplace.json into `.claude-plugin/` subdir, and symlink the plugin
cache so the relative source path resolves.
All bugs introduced in v0.101.0 (2d84d3c). Tested from clean state on
Claude Code v2.1.112 / macOS.1 parent c155da5 commit 94de6f0
4 files changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
0 commit comments