OpenClaw's dependency tree includes several packages with native addons: llama.cpp (local AI inference), sharp (image processing), better-sqlite3 (database), and others. These packages have postinstall scripts that invoke node-gyp, which requires gcc, make, python, and compiles C/C++ code.
On the Moto E2 with 1 GB RAM and a single-core ARM32 CPU, native compilation is not just slow — it's impossible. The compiler runs out of memory within seconds. Even if it could compile, the resulting binaries would be for the proot environment (which emulates armhf), adding another layer of complexity.
Since PocketClaw uses cloud AI providers (Kimi, Gemini, Groq) instead of local models, and the database is file-based JSON, none of these native modules are actually needed at runtime.
Use --ignore-scripts during npm install to skip all pre/post install scripts:
# Install OpenClaw without running any native compilation scripts
npm install -g openclaw --ignore-scripts --legacy-peer-depsThe --legacy-peer-deps flag is also needed because several OpenClaw dependencies have conflicting peer dependency requirements (Hack #38).
For a clean reinstall:
# Remove existing installation
rm -rf $PREFIX/lib/node_modules/openclaw
# Reinstall cleanly
npm install -g openclaw --ignore-scripts --legacy-peer-deps
# Verify it installed correctly
openclaw --version# Check that openclaw is installed:
ls $PREFIX/lib/node_modules/openclaw/dist/cli.js
# Expected: file exists
# Verify no native modules were compiled:
find $PREFIX/lib/node_modules/openclaw -name "*.node" -type f
# Expected: no output (no compiled .node binaries)
# Test that the gateway starts (native modules not needed):
openclaw gateway run --port 9000 &
sleep 5 && curl -s http://localhost:9000/api/status
# Expected: JSON response--ignore-scripts skips ALL lifecycle scripts, including legitimate setup scripts. Some packages may need manual post-install steps.node binary. Check the error and add ESM stubs (Hack #15) for those modulesnpm install — it's not persisted. You can make it permanent with: npm config set ignore-scripts truebcrypt → bcryptjs)| Metric | Before | After |
|---|---|---|
| npm install time | Fails (OOM) | ~3 minutes |
| Native modules compiled | Attempted | 0 |
| Runtime impact | N/A | None (cloud API providers) |