Skip to content

Installer: agent_chat build fails on clean install — missing npm install before npm run build #157

@NOVA-Openclaw

Description

@NOVA-Openclaw

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):

  1. Syncs source files to ~/.openclaw/extensions/agent_chat/
  2. Installs pg to shared ~/.openclaw/node_modules/
  3. Runs npm run buildfails 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

  1. SSH to staging: ssh nova-staging@localhost
  2. Wipe: rm -rf ~/.openclaw
  3. Install OpenClaw from tarball
  4. Run: bash shell-install.sh
  5. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions