Fix npx install for Claude Code v2.1.112#558
Open
frosty-geek wants to merge 2 commits into
Open
Conversation
## Fixes - Resolve lockfile path to `.beastmode/.beastmode-watch.lock` instead of `cli/.beastmode-watch.lock` - Update `.gitignore` entry to match new lockfile path ## Docs - Update lockfile path references in orchestration and CLI context docs ## Artifacts - Design: .beastmode/artifacts/design/2026-04-12-lockfile-path-fix-dcd0.md - Plan: .beastmode/artifacts/plan/2026-04-12-lockfile-path-fix-dcd0--lockfile-path-fix.1.md - Release: .beastmode/artifacts/release/2026-04-12-lockfile-path-fix-dcd0.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
94de6f0 to
3531c61
Compare
6 tasks
Author
|
Superseded by #569 which includes these npx fixes plus full Windows/Linux terminal support (TerminalSessionFactory for wt/gnome-terminal), cross-platform process termination, and Windows-specific plugin marketplace fixes (directory junction, correct .claude-plugin/ layout). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npx beastmode install(vianpx github:BugRoger/beastmode#v0.127.2) doesn't work on a clean Claude Code v2.1.112 installation. Four bugs in the npx installer prevent the plugin from loading, all introduced in v0.101.0.Bugs fixed
1.
.claude-plugin/missing fromfilesin package.jsonpackage.json:9-13— npm strips.claude-plugin/from the tarball even when fetching from GitHub (npx respects thefilesfield regardless of source).plugin-copier.mjsfails with ENOENT. Silent exit code 1.2. Silent failure — error not shown to user
index.mjs:21—process.exit(result.success ? 0 : 1)without printingresult.error. User sees onlyInstalling beastmode v0.127.2...then nothing.3. Wrong field name in
known_marketplaces.jsonconfig-merger.mjs:40-41— writessource.namebut Claude Code expectssource.package. Error:beastmode-marketplace.source.package: Invalid input: expected string, received undefined.4.
source: "npm"not implemented in Claude Codeconfig-merger.mjs:39-40+plugin-copier.mjs:25-28— Claude Code v2.1.112 respondsNPM marketplace sources not yet implemented. Additionally,marketplace.jsonis written to the wrong location (Claude Code expects.claude-plugin/marketplace.jsoninside the marketplace dir), and the"source": "./plugin"relative path doesn't resolve.Changes (4 files, +14 -7)
package.json— add.claude-plugin/tofilessrc/npx-cli/index.mjs— print error on install failuresrc/npx-cli/config-merger.mjs— usesource: "directory"with path instead ofsource: "npm"with namesrc/npx-cli/plugin-copier.mjs— writemarketplace.jsoninto.claude-plugin/subdir, symlink plugin cache into marketplace dir so"source": "./plugin"resolvesTest plan
/pluginshows no errors, marketplace loads, plugin enabled/beastmode,/plan,/design,/implement,/validate,/release)Environment