mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-09 05:19:32 +08:00
docs(install): add pnpm approve-builds step for global installs (#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 #5579 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 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 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,12 +74,16 @@ SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
|
||||
|
||||
If you see `sharp: Please add node-gyp to your dependencies`, either install build tooling (macOS: Xcode CLT + `npm install -g node-gyp`) or use the `SHARP_IGNORE_GLOBAL_LIBVIPS=1` workaround above to skip the native build.
|
||||
|
||||
Or:
|
||||
Or with pnpm:
|
||||
|
||||
```bash
|
||||
pnpm add -g openclaw@latest
|
||||
pnpm approve-builds -g # approve openclaw, node-llama-cpp, sharp, etc.
|
||||
pnpm add -g openclaw@latest # re-run to execute postinstall scripts
|
||||
```
|
||||
|
||||
pnpm requires explicit approval for packages with build scripts. After the first install shows the "Ignored build scripts" warning, run `pnpm approve-builds -g` and select the listed packages, then re-run the install so postinstall scripts execute.
|
||||
|
||||
Then:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user