openclaw - ✅(Solved) Fix Bug: Discord plugin fails to load after update - package.json missing main/exports, extensions point to .ts source files [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#77044Fetched 2026-05-05 05:53:07
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
2
Timeline (top)
cross-referenced ×4commented ×3closed ×1subscribed ×1

After running openclaw update, the Discord plugin fails to load and does not appear in the channels status table. The gateway restart does not recover it.

Error Message

2026-05-04T01:26:24.281Z info Recovering missing plugin install payloads: discord (package directory is missing)
2026-05-04T01:26:32.363Z info npm plugins: 2 updated, 0 unchanged, 1 failed, 1 skipped.
2026-05-04T01:26:32.364Z info Plugin install payload missing after update: package directory is missing
2026-05-04T01:29:53.044Z error package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"])
2026-05-04T01:31:00.807Z error Config invalid outside the bundled recovery path for discord; run `openclaw doctor --fix` before reinstalling it.

Root Cause

After npm install @openclaw/discord, the installed package at /root/.openclaw/npm/node_modules/@openclaw/discord/package.json has:

"main": null,
"exports": null,
"openclaw": {
  "extensions": ["./index.ts"],
  ...
}

Two problems:

  1. main and exports are null — Node cannot resolve the package entry point
  2. Extensions point to raw .ts source files (./index.ts) instead of compiled JS (./dist/index.js) — the published npm package appears to contain source code rather than a built distribution

The gateway log confirms this:

error package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"])

And after manual reinstall attempts:

error Config invalid outside the bundled recovery path for discord; run `openclaw doctor --fix` before reinstalling it.

openclaw doctor --fix does not fix this.

Fix Action

Fix / Workaround

Workaround Attempted

  • Manual npm install @openclaw/discord@latest — installs but package still has null main/exports and .ts extension paths
  • openclaw doctor --fix — does not resolve
  • Gateway restart — Discord still not loaded

PR fix notes

PR #77099: fix: replace extensions with runtimeExtensions in npm package manifest

Description (problem / solution / changelog)

  • fix(telegram): add httpTimeoutMs config for health probe timeout control
  • fix: make migrateLinearTranscriptToParentLinked idempotent
  • fix(webchat): render read tool output and fix exec output overflow
  • fix: persist and restore registered context engines in plugin cache
  • fix: replace extensions with runtimeExtensions in npm package manifest

Changed files

  • extensions/telegram/src/probe.test.ts (modified, +72/-0)
  • extensions/telegram/src/probe.ts (modified, +11/-2)
  • scripts/lib/plugin-npm-package-manifest.mjs (modified, +2/-0)
  • src/config/sessions/transcript-append.ts (modified, +29/-2)
  • src/config/types.telegram.ts (modified, +8/-0)
  • src/config/zod-schema.providers-core.ts (modified, +9/-0)
  • src/context-engine/registry.ts (modified, +43/-0)
  • src/plugins/loader.ts (modified, +8/-0)
  • test/plugin-npm-package-manifest.test.ts (modified, +2/-1)
  • ui/src/styles/chat/tool-cards.css (modified, +1/-1)
  • ui/src/ui/chat/tool-cards.test.ts (modified, +42/-1)
  • ui/src/ui/chat/tool-cards.ts (modified, +18/-0)

Code Example

"main": null,
"exports": null,
"openclaw": {
  "extensions": ["./index.ts"],
  ...
}

---

error package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"])

---

error Config invalid outside the bundled recovery path for discord; run `openclaw doctor --fix` before reinstalling it.

---

2026-05-04T01:26:24.281Z info Recovering missing plugin install payloads: discord (package directory is missing)
2026-05-04T01:26:32.363Z info npm plugins: 2 updated, 0 unchanged, 1 failed, 1 skipped.
2026-05-04T01:26:32.364Z info Plugin install payload missing after update: package directory is missing
2026-05-04T01:29:53.044Z error package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"])
2026-05-04T01:31:00.807Z error Config invalid outside the bundled recovery path for discord; run `openclaw doctor --fix` before reinstalling it.
RAW_BUFFERClick to expand / collapse

Bug Report

Summary

After running openclaw update, the Discord plugin fails to load and does not appear in the channels status table. The gateway restart does not recover it.

Environment

  • OpenClaw version: 2026.5.2
  • OS: Linux 6.17.0-19-generic (x64)
  • Node: v22.22.0

Steps to Reproduce

  1. Run openclaw update on a system with Discord channel configured and working
  2. Update recovers missing plugin payload for discord, reinstalls @openclaw/discord via npm
  3. After update, gateway restart shows only Telegram in channels — Discord is missing
  4. openclaw doctor --fix runs but does not resolve the issue

Root Cause Analysis

After npm install @openclaw/discord, the installed package at /root/.openclaw/npm/node_modules/@openclaw/discord/package.json has:

"main": null,
"exports": null,
"openclaw": {
  "extensions": ["./index.ts"],
  ...
}

Two problems:

  1. main and exports are null — Node cannot resolve the package entry point
  2. Extensions point to raw .ts source files (./index.ts) instead of compiled JS (./dist/index.js) — the published npm package appears to contain source code rather than a built distribution

The gateway log confirms this:

error package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"])

And after manual reinstall attempts:

error Config invalid outside the bundled recovery path for discord; run `openclaw doctor --fix` before reinstalling it.

openclaw doctor --fix does not fix this.

Logs

2026-05-04T01:26:24.281Z info Recovering missing plugin install payloads: discord (package directory is missing)
2026-05-04T01:26:32.363Z info npm plugins: 2 updated, 0 unchanged, 1 failed, 1 skipped.
2026-05-04T01:26:32.364Z info Plugin install payload missing after update: package directory is missing
2026-05-04T01:29:53.044Z error package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"])
2026-05-04T01:31:00.807Z error Config invalid outside the bundled recovery path for discord; run `openclaw doctor --fix` before reinstalling it.

Expected Behavior

Discord plugin should load successfully after update and appear in openclaw status channels table with state OK.

Workaround Attempted

  • Manual npm install @openclaw/discord@latest — installs but package still has null main/exports and .ts extension paths
  • openclaw doctor --fix — does not resolve
  • Gateway restart — Discord still not loaded

Suggested Fix

The @openclaw/discord npm package should be published with:

  1. Built JS files in a dist/ directory
  2. "main": "./dist/index.js" in package.json
  3. "openclaw"."extensions": ["./dist/index.js"] instead of "./index.ts"

extent analysis

TL;DR

The Discord plugin fails to load after running openclaw update due to the @openclaw/discord package having null main and exports fields and pointing to raw .ts source files instead of compiled JS files.

Guidance

  • Verify that the @openclaw/discord package is correctly built and published with a dist/ directory containing the compiled JS files.
  • Check the package.json file of the @openclaw/discord package to ensure it has the correct main and openclaw.extensions fields, such as "main": "./dist/index.js" and "openclaw": { "extensions": ["./dist/index.js"] }.
  • Attempt to manually install a corrected version of the @openclaw/discord package or wait for an updated version to be published.
  • If possible, try to rebuild the @openclaw/discord package locally to ensure it is correctly compiled and packaged.

Example

No code snippet is provided as the issue is related to the packaging and publishing of the @openclaw/discord package.

Notes

The issue seems to be related to the packaging and publishing of the @openclaw/discord package, rather than an issue with the OpenClaw software itself. The suggested fix is to correct the packaging of the @openclaw/discord package.

Recommendation

Apply workaround: wait for an updated version of the @openclaw/discord package to be published with the correct build and packaging.

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