Problem
On a clean OpenClaw installation (wiped ~/.openclaw), agent-install.sh fails to build the agent_chat TypeScript extension because it never runs npm install in the extension directory before npm run build.
What the installer does (lines ~1237-1290):
- Syncs source files to
~/.openclaw/extensions/agent_chat/
- Installs
pg to shared ~/.openclaw/node_modules/
- Runs
npm run build ← fails because devDependencies (typescript, zod, @types/*) don't exist
What it should do:
Insert npm install (or npm ci) in the extension directory after syncing source files and before npm run build. This installs typescript, zod, and other build dependencies listed in the extension's package.json.
Reproduction
- SSH to staging:
ssh nova-staging@localhost
- Wipe:
rm -rf ~/.openclaw
- Install OpenClaw from tarball
- Run:
bash shell-install.sh
- Build fails with TS2307 (cannot find module 'zod', 'openclaw/plugin-sdk', etc.)
Fix
Add npm install step before npm run build in the agent_chat extension section (~line 1283):
# Install dependencies (including devDependencies for build)
echo " Installing extension dependencies..."
npm install >"$NPM_INSTALL_LOG" 2>&1
# Build TypeScript
npm run build
Impact
- Clean installs fail (staging, new deployments)
- Production unaffected (pre-existing node_modules from prior installs)
Problem
On a clean OpenClaw installation (wiped ~/.openclaw),
agent-install.shfails to build the agent_chat TypeScript extension because it never runsnpm installin the extension directory beforenpm run build.What the installer does (lines ~1237-1290):
~/.openclaw/extensions/agent_chat/pgto shared~/.openclaw/node_modules/npm run build← fails because devDependencies (typescript, zod, @types/*) don't existWhat it should do:
Insert
npm install(ornpm ci) in the extension directory after syncing source files and beforenpm run build. This installs typescript, zod, and other build dependencies listed in the extension's package.json.Reproduction
ssh nova-staging@localhostrm -rf ~/.openclawbash shell-install.shFix
Add
npm installstep beforenpm run buildin the agent_chat extension section (~line 1283):Impact