Bug Report
Summary
After upgrading to OpenClaw 2026.5.x via pnpm install -g openclaw, the bundled plugin-sdk re-export export * from "zod" in dist/plugin-sdk/zod.js fails to resolve at runtime. This causes all channel plugins that depend on plugin-sdk/zod (e.g. feishu, bluebubbles) to silently fail during registration.
Environment
- OpenClaw: 2026.5.4
- Install method:
pnpm install -g openclaw (pnpm v10.33.0)
- Node.js: v24.14.0
- OS: Linux (Docker Ubuntu 24.04)
Reproduction
pnpm install -g openclaw@2026.5.4
openclaw gateway start
- Observe gateway logs:
[plugins] feishu failed during register from .../feishu/dist/index.js: Error: Cannot find module 'zod'
Require stack:
- /home/user/.local/share/pnpm/global/5/node_modules/openclaw/dist/plugin-sdk/zod.js
- Verify:
node -e "require.resolve('zod', {paths:['/path/to/pnpm/global/node_modules/openclaw']})" → MODULE_NOT_FOUND
Root Cause
dist/plugin-sdk/zod.js contains:
import "../zod-D2c0iocA.js";
export * from "zod";
The second line is a runtime bare import of zod. In pnpm's strict dependency isolation mode, zod is NOT hoisted/symlinked into openclaw/node_modules/ during a global install, so Node.js ESM resolution fails.
Verified by removing the manual fix and re-running pnpm install -g — zod is not linked:
$ ls openclaw/node_modules/
# Only .bin/ directory, no zod symlink
Current Workaround
Manually symlink zod into openclaw's node_modules:
OPENCLAW_DIR=$(pnpm root -g)/openclaw
ZOD_STORE=$(find "$(pnpm store path)" -path "*/zod@4.4.3/node_modules/zod" -type d | head -1)
mkdir -p "$OPENCLAW_DIR/node_modules"
ln -s "$ZOD_STORE" "$OPENCLAW_DIR/node_modules/zod"
openclaw gateway restart
Suggested Fix
The build should inline zod into plugin-sdk/zod.js rather than using a bare runtime import. Since this file is a public API re-export for plugins (import { z } from "openclaw/plugin-sdk/zod"), the bundler (esbuild/rollup) should bundle the zod dependency inline rather than marking it external.
Alternatively, add a postinstall or doctor check that ensures zod is resolvable from the openclaw package location.
Related Issues
Bug Report
Summary
After upgrading to OpenClaw 2026.5.x via
pnpm install -g openclaw, the bundled plugin-sdk re-exportexport * from "zod"indist/plugin-sdk/zod.jsfails to resolve at runtime. This causes all channel plugins that depend on plugin-sdk/zod (e.g. feishu, bluebubbles) to silently fail during registration.Environment
pnpm install -g openclaw(pnpm v10.33.0)Reproduction
pnpm install -g openclaw@2026.5.4openclaw gateway startnode -e "require.resolve('zod', {paths:['/path/to/pnpm/global/node_modules/openclaw']})"→ MODULE_NOT_FOUNDRoot Cause
dist/plugin-sdk/zod.jscontains:The second line is a runtime bare import of
zod. In pnpm's strict dependency isolation mode,zodis NOT hoisted/symlinked intoopenclaw/node_modules/during a global install, so Node.js ESM resolution fails.Verified by removing the manual fix and re-running
pnpm install -g— zod is not linked:$ ls openclaw/node_modules/ # Only .bin/ directory, no zod symlinkCurrent Workaround
Manually symlink zod into openclaw's node_modules:
Suggested Fix
The build should inline zod into
plugin-sdk/zod.jsrather than using a bare runtime import. Since this file is a public API re-export for plugins (import { z } from "openclaw/plugin-sdk/zod"), the bundler (esbuild/rollup) should bundle the zod dependency inline rather than marking it external.Alternatively, add a
postinstallordoctorcheck that ensures zod is resolvable from the openclaw package location.Related Issues
zoddependency error #12067 — bluebubbles plugin zod error (same root cause, different plugin)