Repository navigation
docs(install): add pnpm approve-builds step for global installs - #5663
Conversation
pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]>
| pnpm add -g openclaw@latest | ||
| pnpm approve-builds -g # select openclaw, node-llama-cpp, sharp, etc. | ||
| ``` |
There was a problem hiding this comment.
[P2] pnpm add -g may not be the recommended global-install command.
pnpm’s global install UX has changed over time (pnpm add -g vs pnpm add --global vs pnpm install -g / pnpm i -g), and readers on different pnpm versions may get warnings or unexpected behavior. Consider using the canonical form used elsewhere in the docs (or pnpm’s current recommendation) to reduce confusion.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/install/index.md
Line: 79:81
Comment:
[P2] `pnpm add -g` may not be the recommended global-install command.
pnpm’s global install UX has changed over time (`pnpm add -g` vs `pnpm add --global` vs `pnpm install -g` / `pnpm i -g`), and readers on different pnpm versions may get warnings or unexpected behavior. Consider using the canonical form used elsewhere in the docs (or pnpm’s current recommendation) to reduce confusion.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
pnpm add -g is the canonical form per pnpm docs (https://pnpm.io/cli/add). No change needed.
| pnpm approve-builds -g # select openclaw, node-llama-cpp, sharp, etc. | ||
| ``` | ||
|
|
||
| pnpm requires explicit approval for packages with build scripts. After `pnpm add -g`, run `pnpm approve-builds -g` and approve the listed packages (openclaw, node-llama-cpp, sharp, protobufjs, etc.), then pnpm will run their postinstall scripts. |
There was a problem hiding this comment.
[P3] Consider tightening the “approve builds” wording to the exact pnpm behavior.
pnpm approve-builds -g is interactive and approvals persist per store; saying “then pnpm will run their postinstall scripts” can read like it happens automatically without re-running/triggering installs. A small wording tweak like “after approving, re-run pnpm add -g openclaw@latest (or reinstall) so postinstall scripts run” would prevent user confusion if they approve after the fact.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/install/index.md
Line: 83:83
Comment:
[P3] Consider tightening the “approve builds” wording to the exact pnpm behavior.
`pnpm approve-builds -g` is interactive and approvals persist per store; saying “then pnpm will run their postinstall scripts” can read like it happens automatically without re-running/triggering installs. A small wording tweak like “after approving, re-run `pnpm add -g openclaw@latest` (or reinstall) so postinstall scripts run” would prevent user confusion if they approve after the fact.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Fixed in ada3806 - now shows explicit 3-step flow: install --> approve-builds --> reinstall.
Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…claw#5663) * docs(install): add pnpm approve-builds step for global installs pnpm requires explicit approval for packages with build scripts. Without running `pnpm approve-builds -g`, openclaw and its dependencies (node-llama-cpp, sharp, protobufjs) won't have their postinstall scripts executed, causing runtime errors. Fixes openclaw#5579 Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(install): clarify pnpm reinstall step after approve-builds Address review feedback: after running `pnpm approve-builds -g`, users need to re-run the install command for postinstall scripts to actually execute. Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
Summary
pnpm approve-builds -gstep when installing openclaw globally with pnpmTest plan
Fixes #5579
Greptile Overview
Greptile Summary
Updates the global install docs to include pnpm-specific guidance: after
pnpm add -g openclaw@latest, users may need to runpnpm approve-builds -gto allow dependency build/postinstall scripts (e.g., sharp/node-llama-cpp) to execute. This fits into the existing “Global install (manual)” section as an alternative to npm-based global installation and helps avoid incomplete installs caused by pnpm’s build-script approval requirement.Confidence Score: 4/5
Context used:
dashboard- CLAUDE.md (source)dashboard- AGENTS.md (source)