openclaw - 💡(How to fix) Fix Weixin Plugin Load Failure: Missing openclaw Package in Dependencies [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#54428Fetched 2026-04-08 01:27:42
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

The openclaw-weixin plugin fails to load with a module resolution error. The plugin requires the openclaw package at runtime for its SDK imports, but the package is only listed in devDependencies in package.json, causing it to not be installed during normal plugin installation.

Error Message

Error: Cannot find module 'openclaw/plugin-sdk/channel-config-schema'
Require stack:
- /root/.openclaw/extensions/openclaw-weixin/index.ts

Full error log:

18:54:16 [plugins] openclaw-weixin failed to load from /root/.openclaw/extensions/openclaw-weixin/index.ts: 
Error: Cannot find module 'openclaw/plugin-sdk/channel-config-schema'
Require stack:
- /root/.openclaw/extensions/openclaw-weixin/index.ts

Root Cause

Root Cause Analysis

Fix Action

Temporary Workaround

Run the following commands to fix the issue:

cd ~/.openclaw/extensions/openclaw-weixin
npm install
openclaw gateway restart

Or use the provided fix script:

curl -o weixin-fixed.sh <script-url>
chmod +x weixin-fixed.sh
./weixin-fixed.sh

Code Example

Error: Cannot find module 'openclaw/plugin-sdk/channel-config-schema'
Require stack:
- /root/.openclaw/extensions/openclaw-weixin/index.ts

---

18:54:16 [plugins] openclaw-weixin failed to load from /root/.openclaw/extensions/openclaw-weixin/index.ts: 
Error: Cannot find module 'openclaw/plugin-sdk/channel-config-schema'
Require stack:
- /root/.openclaw/extensions/openclaw-weixin/index.ts

---

import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";

---

{
  "peerDependencies": {
    "openclaw": ">=2026.3.22"
  },
  "devDependencies": {
    "openclaw": "2026.3.23"
  }
}

---

{
  "dependencies": {
    "openclaw": ">=2026.3.22",
    "qrcode-terminal": "0.12.0",
    "zod": "4.3.6"
  },
  "devDependencies": {
    "@vitest/coverage-v8": "^3.1.0",
    "silk-wasm": "^3.7.1",
    "typescript": "^5.8.0",
    "vitest": "^3.1.0"
  }
}

---

cd ~/.openclaw/extensions/openclaw-weixin
npm install

---

cd ~/.openclaw/extensions/openclaw-weixin
npm install
openclaw gateway restart

---

curl -o weixin-fixed.sh <script-url>
chmod +x weixin-fixed.sh
./weixin-fixed.sh
RAW_BUFFERClick to expand / collapse

Weixin Plugin Load Failure: Missing openclaw Package in Dependencies

Issue Type

  • Bug Report
  • Feature Request
  • Documentation Issue

Description

The openclaw-weixin plugin fails to load with a module resolution error. The plugin requires the openclaw package at runtime for its SDK imports, but the package is only listed in devDependencies in package.json, causing it to not be installed during normal plugin installation.

Error Message

Error: Cannot find module 'openclaw/plugin-sdk/channel-config-schema'
Require stack:
- /root/.openclaw/extensions/openclaw-weixin/index.ts

Full error log:

18:54:16 [plugins] openclaw-weixin failed to load from /root/.openclaw/extensions/openclaw-weixin/index.ts: 
Error: Cannot find module 'openclaw/plugin-sdk/channel-config-schema'
Require stack:
- /root/.openclaw/extensions/openclaw-weixin/index.ts

Root Cause Analysis

Problematic Code

The plugin's index.ts imports from the openclaw package:

import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";

package.json Issue

{
  "peerDependencies": {
    "openclaw": ">=2026.3.22"
  },
  "devDependencies": {
    "openclaw": "2026.3.23"
  }
}

The openclaw package is only in devDependencies and peerDependencies. When the plugin is installed:

  • peerDependencies are not automatically installed (by npm design)
  • devDependencies are not installed in production/linked scenarios
  • The plugin's node_modules lacks the openclaw package at runtime

Steps to Reproduce

  1. Install the weixin plugin: openclaw plugins install openclaw-weixin
  2. Start the gateway: openclaw gateway start
  3. Observe plugin load failure in logs

Expected Behavior

The plugin should load successfully after installation, with all required dependencies available.

Actual Behavior

Plugin fails to load due to missing openclaw module.

Environment

ComponentVersion
openclaw2026.3.23
Node.jsv24.14.1
openclaw-weixin2.0.1
OSLinux (Ubuntu)

Proposed Solutions

Solution 1: Move openclaw to dependencies (Recommended)

{
  "dependencies": {
    "openclaw": ">=2026.3.22",
    "qrcode-terminal": "0.12.0",
    "zod": "4.3.6"
  },
  "devDependencies": {
    "@vitest/coverage-v8": "^3.1.0",
    "silk-wasm": "^3.7.1",
    "typescript": "^5.8.0",
    "vitest": "^3.1.0"
  }
}

Pros:

  • Dependencies are automatically installed
  • Clear indication of runtime requirements
  • Standard npm behavior

Cons:

  • May cause version conflicts if host openclaw version differs

Solution 2: Document Manual Installation Step

Add to plugin README:

cd ~/.openclaw/extensions/openclaw-weixin
npm install

Pros:

  • No code changes required
  • User has control over dependency versions

Cons:

  • Poor user experience
  • Easy to miss during installation

Solution 3: Use Plugin Installation Hook

Create an install.sh script that runs automatically during plugin installation.

Pros:

  • Automated installation
  • Can handle complex setup

Cons:

  • Requires openclaw to support installation hooks
  • Security considerations for running scripts

Temporary Workaround

Run the following commands to fix the issue:

cd ~/.openclaw/extensions/openclaw-weixin
npm install
openclaw gateway restart

Or use the provided fix script:

curl -o weixin-fixed.sh <script-url>
chmod +x weixin-fixed.sh
./weixin-fixed.sh

Files Affected

  • /root/.openclaw/extensions/openclaw-weixin/package.json
  • /root/.openclaw/extensions/openclaw-weixin/index.ts

Additional Context

This issue affects all plugins that:

  1. Import from openclaw/plugin-sdk/* at runtime
  2. Only list openclaw in devDependencies or peerDependencies

The same fix should be applied to any similar plugins in the ecosystem.

Checklist

  • I have searched for existing issues
  • I have included the environment information
  • I have provided steps to reproduce
  • I have proposed potential solutions

Report Date: 2026-03-25
Reporter: Automated Diagnosis Tool

extent analysis

Fix Plan

To resolve the issue, we recommend moving the openclaw package from devDependencies to dependencies in the package.json file of the openclaw-weixin plugin. This ensures that the openclaw package is installed during normal plugin installation.

Here are the steps:

  • Update the package.json file:
{
  "dependencies": {
    "openclaw": ">=2026.3.22"
  },
  "devDependencies": {
    // other dev dependencies
  }
}
  • Remove the openclaw package from peerDependencies if it's not necessary:
{
  "peerDependencies": {
    // other peer dependencies
  }
}
  • Run npm install or yarn install to update the dependencies.

Verification

To verify that the fix worked, follow these steps:

  1. Install the updated openclaw-weixin plugin.
  2. Start the gateway: openclaw gateway start
  3. Check the logs for any errors related to the openclaw package.

Extra Tips

  • Make sure to test the plugin thoroughly after applying the fix to ensure that it works as expected.
  • Consider updating the plugin's documentation to reflect the changed dependency configuration.
  • If you encounter any issues with version conflicts, consider using a version manager like npm or yarn to manage dependencies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Weixin Plugin Load Failure: Missing openclaw Package in Dependencies [1 comments, 2 participants]