Description
Two bundled extensions (twitch and llm-task) crash with Cannot find module errors when running from npm/brew installs. The extensions import runtime values from ../../../src/ paths that don't exist in production builds — only dist/ is shipped.
Repro
npm install -g openclaw@latest
- Configure twitch channel or invoke
llm-task tool
- Observe:
Cannot find module '../../../src/routing/session-key.js' (twitch)
Cannot find module '../../../src/agents/pi-embedded-runner.js' (llm-task)
Root Cause
- twitch/token.ts: Static import from
../../../src/routing/session-key.js — should use openclaw/plugin-sdk/account-id alias
- llm-task/llm-task-tool.ts: Fallback import path is a copy-paste of the primary path (both point to
src/). Should fall back to dist/extensionAPI.js
Both work in dev (monorepo has src/) but break in any production install.
Related
Fix
PR #20415
Description
Two bundled extensions (
twitchandllm-task) crash withCannot find moduleerrors when running from npm/brew installs. The extensions import runtime values from../../../src/paths that don't exist in production builds — onlydist/is shipped.Repro
npm install -g openclaw@latestllm-tasktoolCannot find module '../../../src/routing/session-key.js'(twitch)Cannot find module '../../../src/agents/pi-embedded-runner.js'(llm-task)Root Cause
../../../src/routing/session-key.js— should useopenclaw/plugin-sdk/account-idaliassrc/). Should fall back todist/extensionAPI.jsBoth work in dev (monorepo has
src/) but break in any production install.Related
Fix
PR #20415