Skip to content

fix(docs): replace unsupported pnpm approve-builds -g - #107006

Closed
xy-xh wants to merge 2 commits into
openclaw:mainfrom
xy-xh:fix/docs-pnpm-approve-builds
Closed

xy-xh wants to merge 2 commits into
openclaw:mainfrom
xy-xh:fix/docs-pnpm-approve-builds

Conversation

@xy-xh

@xy-xh xy-xh commented Jul 14, 2026 •

Copy link
Copy Markdown

pnpm 11+ removed global pprove-builds support for global packages. Use --allow-build at install time instead, which is the documented pnpm alternative.

Closes #106166

Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

What Problem This Solves

Fixes an issue where users following the pnpm global installation instructions would encounter ERR_PNPM_APPROVE_BUILDS_NOT_SUPPORTED_WITH_GLOBAL error when running pnpm approve-builds -g , because pnpm 11+ removed global support for the approve-builds command.

Affected surface: The installation documentation page at docs/install/index.md under the pnpm tab.

Why This Change Was Made

The shipped documentation instructed users to run pnpm approve-builds -g after installing OpenClaw globally, but pnpm 11+ explicitly removed this global-mode approval command. The fix replaces the two-step install-then-approve flow with a single pnpm add -g openclaw@latest --allow-build command, which uses pnpm's documented install-time approval alternative. This is the narrowest maintainable fix that aligns with current pnpm behavior while keeping the source-checkout approval guidance unchanged.

User Impact

Users installing OpenClaw via pnpm global install can now successfully complete the installation without encountering an unsupported command error. The installation flow remains straightforward with a single command, and the note explains why the change was made for users upgrading from older pnpm versions.

Evidence

  • Before: Running pnpm approve-builds -g with pnpm 11+ produces: "approve-builds" is not supported with global packages (see pnpm issue feat(providers): add Claude models to GitHub Copilot provider #11447 )
  • After: pnpm add -g openclaw@latest --allow-build=openclaw successfully installs and builds OpenClaw in one step
  • Source change: Modified docs/install/index.md — replaces the separate approval step with the --allow-build flag at install time

pnpm 11+ removed global �pprove-builds support for global packages.
Use --allow-build at install time instead, which is the documented pnpm alternative.

Closes openclaw#106166
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Jul 14, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 14, 2026
@clawsweeper

clawsweeper Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

This branch is correct, but it does not need a separate landing path because the older open pull request #106180 carries the same file-level fix for the same reported documentation bug and follows the official pnpm 11 guidance.

Root-cause cluster
Relationship: duplicate
Canonical: #106180
Summary: The current PR and the older canonical PR apply the same supported pnpm command correction to the same documentation lines for the same reported issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Land one exact-head version of #106180, close the competing duplicate branches, and let #106166 close when that canonical fix merges.

So I’m closing this here and keeping the remaining discussion on #106180 and #106166.

Review details

Best possible solution:

Land one exact-head version of #106180, close the competing duplicate branches, and let #106166 close when that canonical fix merges.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main documents pnpm approve-builds -g, while pnpm 11 explicitly rejects that global mode and documents install-time --allow-build as the replacement.

Is this the best way to solve the issue?

The command change is correct, but maintaining this second identical landing candidate is not the best repository path; the older canonical PR should be reviewed and landed instead.

Security review:

Security review cleared: The docs-only diff introduces no executable, dependency, permissions, secret-handling, or supply-chain change.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • sfo2001: Authored the merged change that introduced the global pnpm approval instruction now being corrected. (role: introduced behavior; confidence: high; commits: 3ae049b5012c; files: docs/install/index.md)
  • steipete: Has repeatedly maintained installation documentation and adjacent installer behavior, including a recent multi-file install-switching update. (role: recent area contributor; confidence: high; commits: 6f50253a4d08, 7807e1e, a631270; files: docs/install/index.md, docs/install/updating.md, scripts/install.sh)
  • vincentkoc: Authored the major install-index readability rewrite and several later structural updates to this page. (role: major docs refactor author; confidence: high; commits: e1a39c6ba58e, 78e4f51, 4a2cd53; files: docs/install/index.md)

Codex review notes: model internal, reasoning high; reviewed against ac4fd2ad4265.

pnpm 11 requires --allow-build to specify package names explicitly.
Using --allow-build=openclaw matches pnpm's documented syntax for global installs.
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. labels Jul 14, 2026
@steipete

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review verdict duplicate_or_superseded (decision packet 2026-07-14T10:08:07.545Z). This item was part of the audited close backlog (openclaw/clawsweeper#920) stranded by an apply-lane defect, drained manually after re-verification. If this is wrong, reopen and ClawSweeper will re-review.

@steipete steipete closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs Bug]: pnpm approve-builds -g unavailable

2 participants