Skip to content

Bundled extensions fail with Cannot find module on npm/brew installs #20548

@88plug

Description

@88plug

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

  1. npm install -g openclaw@latest
  2. Configure twitch channel or invoke llm-task tool
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions