Skip to content

bug: npm install -g openclaw crashes - stageRuntimeDependencies not staging @buape/carbon and @larksuiteoapi/node-sdk #62749

Description

@achandmsft

Bug

Fresh npm install -g openclaw@latest crashes on startup with missing module errors:

Cannot find module '@buape/carbon'
Require stack:
- /usr/local/lib/node_modules/openclaw/dist/ui-7MjYF8PY.js

After manually installing @buape/carbon, a second missing module appears:

Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /usr/local/lib/node_modules/openclaw/dist/probe-Y2l52Hc0.js

Root cause

Both extensions/discord and extensions/feishu declare these as dependencies in their own package.json files and set bundle.stageRuntimeDependencies: true. However, the build pipeline is not staging these runtime dependencies into dist/ during the npm publish build, so they are missing when installed via npm (as opposed to pnpm from source).

Reproduction

npm install -g openclaw@latest
openclaw --version
# Error: Cannot find module '@buape/carbon'

Workaround

cd /usr/local/lib/node_modules/openclaw
npm install @buape/carbon @larksuiteoapi/node-sdk

Expected fix

The stageRuntimeDependencies pipeline should ensure these packages are either:

  • Bundled into the dist output, or
  • Added to the published package.json dependencies automatically during the build

Per CLAUDE.md, plugin-only deps should NOT be added to root package.json manually.

Environment

  • openclaw 2026.4.5
  • Node.js 24.14.1
  • Fresh Docker container (node:24-slim)
  • Installed via: npm install -g openclaw@latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions