fix: restore pnpm.onlyBuiltDependencies in plugin package.json for standalone install#318
Open
linliehanfeng wants to merge 1 commit into
Open
Conversation
When this plugin is installed via Claude Code's plugin marketplace, only the understand-anything-plugin/ subdirectory is copied to the user's plugin cache. The monorepo root package.json — where commit 2083342 (PR Lum1104#142 review feedback) parked pnpm.onlyBuiltDependencies — is not part of the installed payload. On pnpm v10 (errors instead of warning on ignored builds), pnpm install inside the installed plugin directory then fails with ERR_PNPM_IGNORED_BUILDS for esbuild and 12 tree-sitter parsers. This blocks /understand at Phase 0 step 1.5 ("Ensure the plugin is built"). Re-add the same allowlist (plus sharp) to understand-anything-plugin/package.json so it survives subdirectory extraction during plugin install. Intentional duplication with the root copy: root serves contributor pnpm install from the workspace, sub-package serves end-users who only receive the subdirectory via plugin marketplace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Problem
When this plugin is installed via Claude Code's plugin marketplace (
/plugin install understand-anything@understand-anything), only theunderstand-anything-plugin/subdirectory is copied into~/.claude/plugins/cache/. The monorepo rootpackage.jsonis not part of the installed payload.Since PR #142's review-feedback fix (commit 2083342) moved
pnpm.onlyBuiltDependenciesfromunderstand-anything-plugin/package.jsonto the monorepo root, end-user installs no longer carry any allowlist for native build scripts. On pnpm v10 (which errors instead of warning on ignored builds),pnpm installinside the installed plugin directory fails:This blocks the
/understandskill at Phase 0 step 1.5 ("Ensure the plugin is built") —packages/core/dist/index.jscannot be produced and the skill aborts with the standard "Install Node.js ≥ 22 and pnpm ≥ 10" hint.Repro
pnpm installdue to ignored build scripts.Fix
Re-add
pnpm.onlyBuiltDependenciestounderstand-anything-plugin/package.json, mirroring the list in the monorepo root (plussharp, which is already in the root copy).This is intentional duplication:
pnpm installfrom monorepo rootpackage.jsonunderstand-anything-plugin/package.jsonWithout this, every fresh CC plugin install hits
ERR_PNPM_IGNORED_BUILDSuntil the user manually edits the package.Verified
After the change, on a clean pnpm cache:
Then
/understandproceeds through Phases 0–7 and writes a validknowledge-graph.json.