Summary
Installing OpenClaw on a Node environment without the git binary on PATH fails with npm error syscall spawn git / ENOENT. Root cause is a transitive dependency (@whiskeysockets/baileys → libsignal) that resolves via git+https://github.com/... rather than the npm registry. npm must shell out to git to clone that URL during dependency resolution, so the install aborts before reaching any lifecycle scripts.
Environment
- OS: Ubuntu 24.04 minimal (Lima VM, aarch64)
- Node: v22.22.2 (from NodeSource)
- npm: 10.9.7
- Install command:
npm install -g openclaw@latest
- git: not installed (minimal VM)
What works
- OpenClaw 2026.4.2 — installed successfully about 3 days before this report. Either baileys wasn't pulled in yet, or its libsignal version range didn't hit the git URL.
- Any environment that already has
git on PATH (most dev machines, default Dockerfile base images).
What fails
- OpenClaw 2026.4.14 and 2026.4.15 — both fail the same way on a clean VM without git.
- Fresh Lima VM that deliberately installs only
ca-certificates curl gnupg nodejs (no git).
Exact error
+ npm install -g openclaw@latest
npm error code ENOENT
npm error syscall spawn git
npm error path git
npm error errno -2
npm error enoent An unknown git error occurred
Debug log excerpt
From /root/.npm/_logs/<timestamp>-debug-0.log:
silly fetch manifest libsignal@git+https://github.com/whiskeysockets/libsignal-node.git
silly placeDep node_modules/openclaw/node_modules/@whiskeysockets/baileys libsignal@ OK
for: @whiskeysockets/baileys@7.0.0-rc.9
want: git+https://github.com/whiskeysockets/libsignal-node.git
error syscall spawn git
Mitigations that did not help
--ignore-scripts — blocks lifecycle scripts, but not dependency resolution. npm still needs git to clone libsignal.
--legacy-peer-deps — peer dep flag, doesn't affect git spawn.
Workarounds (user side)
- Install git in the environment. 20 MB package, expands runtime attack surface for VMs that won't otherwise use git.
- Install git, run npm install, remove git. Keeps the final VM clean but adds steps to the provisioning pipeline.
- Pre-build
node_modules on a build machine and ship a tarball. Works but adds CI complexity.
Suggested fix
The root cause is upstream in baileys, but OpenClaw pulls it in by default so fixing it here has the biggest impact.
- Option A: Pin
@whiskeysockets/baileys to a version whose libsignal dep points to an npm-registry package rather than a git URL.
- Option B: Make baileys an
optionalDependency, or move WhatsApp support to a separate extension package that users opt into. Matches the pattern used for other channel adapters.
- Option C: Publish a
libsignal shim on npm that re-exports the git-hosted version.
Reproduction
docker run --rm -it ubuntu:24.04 bash -c '
apt-get update -qq
apt-get install -y -qq ca-certificates curl gnupg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
apt-get update -qq
apt-get install -y -qq nodejs
npm install -g openclaw@latest
'
Expected: clean install.
Actual: fails with spawn git ENOENT.
Impact
- Every minimal/hardened VM or container that installs OpenClaw needs git added and (if security-conscious) removed after install.
- Docs that say "install Node + OpenClaw" are incomplete — users following the minimal path hit this.
- Supply chain risk:
git+https:// resolution fetches code directly from GitHub, bypassing npm registry signing and mirroring. A compromise of the whiskeysockets/libsignal-node GitHub repo affects every fresh OpenClaw install.
Summary
Installing OpenClaw on a Node environment without the
gitbinary on PATH fails withnpm error syscall spawn git/ENOENT. Root cause is a transitive dependency (@whiskeysockets/baileys→libsignal) that resolves viagit+https://github.com/...rather than the npm registry. npm must shell out to git to clone that URL during dependency resolution, so the install aborts before reaching any lifecycle scripts.Environment
npm install -g openclaw@latestWhat works
giton PATH (most dev machines, default Dockerfile base images).What fails
ca-certificates curl gnupg nodejs(no git).Exact error
Debug log excerpt
From
/root/.npm/_logs/<timestamp>-debug-0.log:Mitigations that did not help
--ignore-scripts— blocks lifecycle scripts, but not dependency resolution. npm still needs git to clone libsignal.--legacy-peer-deps— peer dep flag, doesn't affect git spawn.Workarounds (user side)
node_moduleson a build machine and ship a tarball. Works but adds CI complexity.Suggested fix
The root cause is upstream in baileys, but OpenClaw pulls it in by default so fixing it here has the biggest impact.
@whiskeysockets/baileysto a version whoselibsignaldep points to an npm-registry package rather than a git URL.optionalDependency, or move WhatsApp support to a separate extension package that users opt into. Matches the pattern used for other channel adapters.libsignalshim on npm that re-exports the git-hosted version.Reproduction
Expected: clean install.
Actual: fails with
spawn git ENOENT.Impact
git+https://resolution fetches code directly from GitHub, bypassing npm registry signing and mirroring. A compromise of thewhiskeysockets/libsignal-nodeGitHub repo affects every fresh OpenClaw install.