openclaw - ✅(Solved) Fix [Bug]: @openclaw/[email protected] fails on [email protected]: missing plugin-sdk/discord export [1 pull requests, 3 comments, 3 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#73685Fetched 2026-04-29 06:16:23
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
0
Timeline (top)
commented ×3cross-referenced ×2closed ×1labeled ×1

After upgrading OpenClaw core from 2026.4.25 to 2026.4.26, the external Discord plugin fails to load during gateway startup.

@openclaw/[email protected] imports openclaw/plugin-sdk/discord, but [email protected] no longer exports ./plugin-sdk/discord in its package exports map. The plugin loader then tries to resolve:

/usr/local/lib/node_modules/openclaw/dist/plugin-sdk/root-alias.cjs/discord

That path does not exist, so the Discord plugin never registers and the bot appears offline.

Force reinstalling the plugin does not help because npm still publishes @openclaw/[email protected] as latest, with the same import. Rolling core back to [email protected] restores Discord.

Error Message

Error: Error: Cannot find module

Root Cause

Force reinstalling the plugin does not help because npm still publishes @openclaw/[email protected] as latest, with the same import. Rolling core back to [email protected] restores Discord.

Fix Action

Workaround

Rollback core to [email protected].

PR fix notes

PR #73703: fix(plugin-sdk): add missing discord export for external channel plugin

Description (problem / solution / changelog)

Summary

Add ./plugin-sdk/discord to the package.json exports map so @openclaw/[email protected] (and future versions) can resolve openclaw/plugin-sdk/discord.

Root cause

[email protected]'s package.json exports map does not include ./plugin-sdk/discord. When the external Discord plugin does import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/discord", Node's exports-map resolver rejects it. The plugin loader's fallback tries dist/plugin-sdk/root-alias.cjs/discord which doesn't exist either, so the Discord plugin never registers and the bot stays offline.

Changes

  1. src/plugin-sdk/discord.ts — new barrel re-exporting the four symbols the Discord plugin uses: OpenClawPluginApi, OpenClawConfig, PluginRuntime, emptyPluginConfigSchema.
  2. package.json — add ./plugin-sdk/discord export entry pointing to the new barrel's build output.
  3. scripts/lib/plugin-sdk-entrypoints.json — register discord so the build pipeline includes it.

Verification

All source imports resolve to existing files. Build output (dist/plugin-sdk/discord.js + .d.ts) will be produced by the standard plugin-sdk build pipeline.

Fixes #73685

Changed files

  • package.json (modified, +4/-0)
  • scripts/lib/plugin-sdk-entrypoints.json (modified, +1/-0)
  • src/plugin-sdk/discord.ts (added, +13/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading OpenClaw core from 2026.4.25 to 2026.4.26, the external Discord plugin fails to load during gateway startup.

@openclaw/[email protected] imports openclaw/plugin-sdk/discord, but [email protected] no longer exports ./plugin-sdk/discord in its package exports map. The plugin loader then tries to resolve:

/usr/local/lib/node_modules/openclaw/dist/plugin-sdk/root-alias.cjs/discord

That path does not exist, so the Discord plugin never registers and the bot appears offline.

Force reinstalling the plugin does not help because npm still publishes @openclaw/[email protected] as latest, with the same import. Rolling core back to [email protected] restores Discord.

Steps to reproduce

Steps to reproduce

  1. On macOS, install/run [email protected] with the Discord plugin enabled.
  2. Install the Discord plugin:

bash openclaw plugins install @openclaw/discord

  1. Confirm Discord works on 2026.4.25.
  2. Upgrade core:

bash openclaw update This upgrades core to [email protected].

  1. Restart the gateway:

bash openclaw gateway restart

  1. Check logs/status:

bash openclaw logs --follow openclaw status --deep

Expected behavior

Expected behavior

The Discord plugin should load successfully after upgrading core, and the Discord bot should come online as it did on [email protected].

Actual behavior

Actual behavior

The Discord plugin fails to load during gateway startup, so the bot stays offline.

Error: text [plugins] discord failed to load from ~/.openclaw/extensions/discord/index.ts: Error: Cannot find module '/usr/local/lib/node_modules/openclaw/dist/plugin-sdk/root-alias.cjs/discord' @openclaw/[email protected] imports openclaw/plugin-sdk/discord, but [email protected] does not export ./plugin-sdk/discord.

A force reinstall does not fix it: bash openclaw plugins install @openclaw/discord --force because npm still resolves @openclaw/discord to 2026.3.13.

Workaround

Rollback core to [email protected].

OpenClaw version

[email protected]

Operating system

macos 15.4

Install method

NPM global

Model

gpt 5.5

Provider / routing chain

openclaw -> gateway> gpt

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The Discord plugin fails to load after upgrading OpenClaw core from 2026.4.25 to 2026.4.26 due to a missing export in the new core version, and a workaround is to rollback the core to 2026.4.25.

Guidance

  • The issue is caused by [email protected] no longer exporting ./plugin-sdk/discord in its package exports map, which is required by @openclaw/[email protected].
  • To verify the issue, check the logs for the error message indicating that the Discord plugin failed to load due to a missing module.
  • A temporary workaround is to rollback the OpenClaw core to 2026.4.25 using the command openclaw update with the --version flag set to 2026.4.25, or by manually installing the previous version.
  • To mitigate the issue, consider updating the Discord plugin to a version that is compatible with [email protected], if available.

Example

No code snippet is provided as the issue is related to a missing export in the OpenClaw core package.

Notes

The issue is specific to the combination of OpenClaw core version 2026.4.26 and Discord plugin version 2026.3.13. The workaround may not be applicable if other dependencies or plugins are affected by the core version change.

Recommendation

Apply the workaround by rolling back the OpenClaw core to 2026.4.25 until a compatible version of the Discord plugin is available, as this is the most straightforward solution to restore functionality.

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…

FAQ

Expected behavior

Expected behavior

The Discord plugin should load successfully after upgrading core, and the Discord bot should come online as it did on [email protected].

Still need to ship something?

×6

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

Back to top recommendations

TRENDING