fix: use user-local npm prefix for openclaw install (#1941)

npm install -g openclaw fails with EACCES on non-root users (e.g.,
ubuntu on AWS Lightsail) because /usr/local/lib/node_modules isn't
writable. Use the same ~/.npm-global prefix pattern already used by
codex and kilocode agents.

Fixes both the standard installAgent path and the batched
setupOpenclawBatched path (used by Fly).

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
A 2026-02-25 21:57:09 -08:00 committed by GitHub
parent 357132b506
commit 954f3b4893
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.10.17",
"version": "0.10.18",
"type": "module",
"bin": {
"spawn": "cli.js"