Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Plugins that declare openclaw as a peerDependency fail to start after installation via openclaw plugins install. The openclaw package is not symlinked or otherwise made available in the plugin's node_modules/, causing module resolution failure at runtime.
Steps to reproduce
Error: Cannot find package 'openclaw' imported from /Users/zhouxia/.openclaw/extensions/dingtalk-connector/dist/runtime-CAQ2GHj-.mjs
2026-04-23T09:26:46.162+08:00 [dingtalk-connector] [default] startAccount error: Cannot find package 'openclaw' imported from .../runtime-CAQ2GHj-.mjs
2026-04-23T09:26:46.163+08:00 [dingtalk-connector] [default] channel exited: Cannot find package 'openclaw' imported from .../runtime-CAQ2GHj-.mjs
Expected behavior
After repeated crashes, the channel is in failed (unknown) state, resulting in 404 errors when the bot attempts to send replies.
Root Cause Analysis
Problematic dependency structure (@dingtalk-real-ai/dingtalk-connector 0.8.18):
{
"dependencies": {
"axios": "1.14.0",
"dingtalk-stream": "2.1.4",
"form-data": "4.0.0",
"qrcode-terminal": "0.12.0",
"zod": "4.3.6"
},
"peerDependencies": {
"openclaw": ">=2026.4.9"
}
}
Actual behavior
The openclaw package was moved from dependencies to peerDependencies between v0.8.16 and v0.8.18. When the plugin is installed via openclaw plugins install:
peerDependencies are not automatically installed (by npm design)
devDependencies are not installed in production/linked scenarios
The globally installed openclaw (at /opt/homebrew/lib/node_modules/openclaw/) is not on Node.js's module resolution path for the plugin directory
The plugin's node_modules/ lacks the openclaw package at runtime
This is the same root cause as #54428 (weixin plugin), but affects the DingTalk connector in a different way — openclaw was previously in dependencies and worked, then moved to peerDependencies in a minor version bump, breaking existing installations.
OpenClaw version
2026.4.21
Operating system
macOS 25.3.0 (arm64)
Install method
npm global
Model
bailian/kimi-2.6
Provider / routing chain
openclaw -> bailian/kimi-2.6
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Solution 1: plugins install should auto-link peerDependencies (Recommended)
After installing a plugin, openclaw plugins install should:
Read the plugin's peerDependencies
For each peerDependency, check if a compatible global version is installed
Create a symlink in the plugin's node_modules/ pointing to the global package
This ensures all plugins benefit automatically, without requiring individual plugin maintainers to change their dependency strategy.
Solution 2: Move openclaw back to dependencies
Revert openclaw from peerDependencies back to dependencies in affected plugins (DingTalk connector, weixin, etc.).
回复 曾迪:
请你参考一下这个Weixin Plugin Load Failure: Missing openclaw Package in Dependencies · Issue #54428 · openclaw/openc
按照标准的提法,且用英文
Pros: Works immediately with current install flow
Cons: Duplicates openclaw in each plugin's node_modules/, increasing disk usage
Solution 3: Document the manual symlink workaround
Add to plugin README / install docs:
ln -s /opt/homebrew/lib/node_modules/openclaw \
~/.openclaw/extensions/dingtalk-connector/node_modules/openclaw
Pros: No code changes
Cons: Poor UX, easy to miss, breaks on every plugin update
Temporary Workaround
ln -s /opt/homebrew/lib/node_modules/openclaw \
~/.openclaw/extensions/dingtalk-connector/node_modules/openclaw
openclaw gateway restart
Additional Context
This issue affects any plugin that:
Imports from the openclaw package at runtime
Lists openclaw only in peerDependencies (not in dependencies)
Is installed via openclaw plugins install
The same fix applied here would also resolve #54428 and prevent similar issues for future plugins.
Impact and severity
No response
Additional information
No response
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Plugins that declare openclaw as a peerDependency fail to start after installation via openclaw plugins install. The openclaw package is not symlinked or otherwise made available in the plugin's node_modules/, causing module resolution failure at runtime.
Steps to reproduce
Error: Cannot find package 'openclaw' imported from /Users/zhouxia/.openclaw/extensions/dingtalk-connector/dist/runtime-CAQ2GHj-.mjs
2026-04-23T09:26:46.162+08:00 [dingtalk-connector] [default] startAccount error: Cannot find package 'openclaw' imported from .../runtime-CAQ2GHj-.mjs
2026-04-23T09:26:46.163+08:00 [dingtalk-connector] [default] channel exited: Cannot find package 'openclaw' imported from .../runtime-CAQ2GHj-.mjs
Expected behavior
After repeated crashes, the channel is in failed (unknown) state, resulting in 404 errors when the bot attempts to send replies.
Root Cause Analysis
Problematic dependency structure (@dingtalk-real-ai/dingtalk-connector 0.8.18):
{
"dependencies": {
"axios": "1.14.0",
"dingtalk-stream": "2.1.4",
"form-data": "4.0.0",
"qrcode-terminal": "0.12.0",
"zod": "4.3.6"
},
"peerDependencies": {
"openclaw": ">=2026.4.9"
}
}
Actual behavior
The openclaw package was moved from dependencies to peerDependencies between v0.8.16 and v0.8.18. When the plugin is installed via openclaw plugins install:
peerDependencies are not automatically installed (by npm design)
devDependencies are not installed in production/linked scenarios
The globally installed openclaw (at /opt/homebrew/lib/node_modules/openclaw/) is not on Node.js's module resolution path for the plugin directory
The plugin's node_modules/ lacks the openclaw package at runtime
This is the same root cause as #54428 (weixin plugin), but affects the DingTalk connector in a different way — openclaw was previously in dependencies and worked, then moved to peerDependencies in a minor version bump, breaking existing installations.
OpenClaw version
2026.4.21
Operating system
macOS 25.3.0 (arm64)
Install method
npm global
Model
bailian/kimi-2.6
Provider / routing chain
openclaw -> bailian/kimi-2.6
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response