fix(skill): bypass host packageManager pin in Phase 0 build (#315)#390
Open
tirth8205 wants to merge 1 commit into
Open
fix(skill): bypass host packageManager pin in Phase 0 build (#315)#390tirth8205 wants to merge 1 commit into
tirth8205 wants to merge 1 commit into
Conversation
…I#315) When `/understand` runs from a host project whose `package.json` pins `"packageManager": "yarn@x"` or `"npm@x"`, corepack consults the shell CWD's pin (not pnpm's `-C` / `--dir` target) and refuses to launch pnpm — failing the Phase 0 plugin build before any analysis can begin. Three changes: 1. SKILL.md Phase 0 — wrap each pnpm invocation in `(cd "$PLUGIN_ROOT" && COREPACK_ENABLE_PROJECT_SPEC=0 pnpm …)`. The subshell `cd` makes corepack's CWD-based lookup hit the plugin's own packageManager pin; the env var disables corepack project-spec enforcement entirely as a backstop. Add a maintainer note explaining why so future cleanups don't strip the guards. 2. understand-anything-plugin/package.json — add the same `packageManager: "pnpm@10.6.2+sha512.…"` value used by the root package.json, so corepack inside the plugin dir always picks pnpm even when launched standalone (e.g., from the marketplace cache copy). 3. pnpm-lock.yaml — regenerate. The shipped lockfile was missing the `graphology` and `graphology-communities-louvain` importers (plus a stale vite pin), causing `pnpm install --frozen-lockfile` to fail from the plugin dir with `ERR_PNPM_OUTDATED_LOCKFILE` before the corepack issue could even be reached. Verified: `pnpm install --frozen-lockfile` and `pnpm --filter @understand-anything/core build` both succeed from the plugin dir after the changes. 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.
Summary
Closes #315.
When
/understandruns from a host project whosepackage.jsonpins"packageManager": "yarn@x"or"npm@x", corepack reads the shell CWD's pin (not pnpm's-C/--dirtarget) and refuses to launch pnpm — failing the Phase 0 plugin build before any analysis can begin.(cd "$PLUGIN_ROOT" && COREPACK_ENABLE_PROJECT_SPEC=0 pnpm …). The subshellcdmakes corepack's CWD-based lookup hit the plugin's ownpackageManagerpin; the env var disables corepack project-spec enforcement entirely as a backstop. Added a maintainer note inline so future cleanups don't strip the guards."packageManager": "pnpm@10.6.2+sha512.…"value used by the rootpackage.json, so corepack inside the plugin dir always picks pnpm (e.g., when running from the marketplace cache copy where the rootpackage.jsonisn't a parent).graphology/graphology-communities-louvainimporter entries (added in earlier PRs to the plugin'spackage.json) plus a stalevitepin in the dashboard workspace, sopnpm install --frozen-lockfilewas already failing withERR_PNPM_OUTDATED_LOCKFILEbefore the corepack issue could even surface — the issue's second papercut.Test plan
pnpm install --frozen-lockfilefromunderstand-anything-plugin/succeeds (was failing before withERR_PNPM_OUTDATED_LOCKFILE).pnpm --filter @understand-anything/core buildfromunderstand-anything-plugin/succeeds./understandfrom a project whosepackage.jsonpins"packageManager": "yarn@4.x"and confirm Phase 0 build no longer fails withThis project is configured to use yarn.🤖 Generated with Claude Code