openclaw - 💡(How to fix) Fix 2026.4.25: chokidar v5 default-import + plugin-loader regression breaks gateway (rollback to 2026.4.24 fixes) [2 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#73176Fetched 2026-04-29 06:22:36
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Timeline (top)
commented ×2closed ×1mentioned ×1subscribed ×1

OpenClaw 2026.4.25 fails to boot the embedded agent and most plugins due to a chokidar v5 default-import incompatibility in the bundled dist/*.js files. This causes Teams (and presumably Discord/Slack/etc.) to silently drop replies to inbound DMs, heartbeat lanes fail every cron tick, and only 3 of the normal 8+ plugins load.

Rolling back to 2026.4.24 fully restores the system.

Error Message

error=LLM request rejected: messages: at least one message is required rawError=400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: at least one message is required"}} 3. Inbound Teams DMs are received but never get a reply. The msteams provider logs the inbound message reaching the agent lane, but the agent fails before producing a response (same "messages: at least one message is required" error).

Root Cause

package.json declares:

"chokidar": "^5.0.0"

But the bundled dist files use a default import:

// dist/qmd-manager-FuXCtSYP.js (and 4 other dist files)
import chokidar from "chokidar";
// ...
this.watcher = chokidar.watch(Array.from(watchPaths), { ... });

[email protected] is "type": "module" and its exports field exposes only:

"exports": {
  ".": { "default": "./index.js" },
  "./handler.js": { "default": "./handler.js" }
}

The named watch export and FSWatcher are exposed, but the default export changed in v5 — import chokidar from "chokidar" no longer yields an object with a .watch() method via the dist/ ESM bundle's resolution path. Result: chokidar resolves but is not the expected shape, and Node emits Cannot find package 'chokidar' / Did you mean to import "chokidar/index.js"? warnings before the import fails.

This breaks 5 dist files:

dist/server-plugin-bootstrap-CqofqB0r.js
dist/refresh-CFfbjczz.js
dist/server.impl-C1dgKTkE.js
dist/manager-C6O7HXGc.js
dist/qmd-manager-FuXCtSYP.js

The qmd-manager failure cascades into the embedded agent's context assembly, which then sends an empty messages array to the LLM provider — explaining the "messages: at least one message is required" 400 from Anthropic on every heartbeat and every inbound Teams message.

Fix Action

Fix / Workaround

Workarounds attempted (not sufficient)

  • Pinning [email protected] in plugin-runtime-deps package.json — gateway's bundled-deps stager re-installs [email protected] per the OpenClaw package.json spec on next boot, reverting the pin.
  • Patching all 5 dist files with import * as chokidar from "chokidar" — reduced chokidar resolution errors but did not restore the missing 5 plugins or fix the "messages empty" downstream agent-context failure. Patches are also clobbered on next npm install -g openclaw.

Code Example

[gateway] ready (3 plugins: acpx, memory-core, msteams; 4.6s)

---

[gateway] ready (8 plugins: acpx, bonjour, browser, device-pair, memory-core, msteams, phone-control, talk-voice; 2.0s)

---

[agent/embedded] embedded run agent end: ... isError=true
     error=LLM request rejected: messages: at least one message is required
     rawError=400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: at least one message is required"}}

---

[memory] qmd memory unavailable; falling back to builtin: Cannot find package 'chokidar' imported from /Users/.../plugin-runtime-deps/openclaw-2026.4.25-.../dist/qmd-manager-FuXCtSYP.js
   Did you mean to import "chokidar/index.js"?
   [gateway] qmd memory startup initialization failed for agent "main": Cannot find package 'chokidar' imported from .../dist/manager-C6O7HXGc.js

---

"chokidar": "^5.0.0"

---

// dist/qmd-manager-FuXCtSYP.js (and 4 other dist files)
import chokidar from "chokidar";
// ...
this.watcher = chokidar.watch(Array.from(watchPaths), { ... });

---

"exports": {
  ".": { "default": "./index.js" },
  "./handler.js": { "default": "./handler.js" }
}

---

dist/server-plugin-bootstrap-CqofqB0r.js
dist/refresh-CFfbjczz.js
dist/server.impl-C1dgKTkE.js
dist/manager-C6O7HXGc.js
dist/qmd-manager-FuXCtSYP.js

---

npm install -g openclaw@2026.4.24
openclaw gateway restart
RAW_BUFFERClick to expand / collapse

Summary

OpenClaw 2026.4.25 fails to boot the embedded agent and most plugins due to a chokidar v5 default-import incompatibility in the bundled dist/*.js files. This causes Teams (and presumably Discord/Slack/etc.) to silently drop replies to inbound DMs, heartbeat lanes fail every cron tick, and only 3 of the normal 8+ plugins load.

Rolling back to 2026.4.24 fully restores the system.

Environment

  • OpenClaw: 2026.4.25 (installed via npm install -g openclaw)
  • Node: v22.22.1
  • macOS: Darwin 25.4.0 (arm64)
  • Install path: /opt/homebrew/lib/node_modules/openclaw/

Symptoms

After upgrading to 2026.4.25:

  1. Plugin set shrinks from 8 to 3. Gateway boot log shows:

    [gateway] ready (3 plugins: acpx, memory-core, msteams; 4.6s)

    Where 2026.4.24 loaded:

    [gateway] ready (8 plugins: acpx, bonjour, browser, device-pair, memory-core, msteams, phone-control, talk-voice; 2.0s)
  2. Heartbeat / agent lane fails on every tick with:

    [agent/embedded] embedded run agent end: ... isError=true
      error=LLM request rejected: messages: at least one message is required
      rawError=400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: at least one message is required"}}
  3. Inbound Teams DMs are received but never get a reply. The msteams provider logs the inbound message reaching the agent lane, but the agent fails before producing a response (same "messages: at least one message is required" error).

  4. Persistent stderr noise:

    [memory] qmd memory unavailable; falling back to builtin: Cannot find package 'chokidar' imported from /Users/.../plugin-runtime-deps/openclaw-2026.4.25-.../dist/qmd-manager-FuXCtSYP.js
    Did you mean to import "chokidar/index.js"?
    [gateway] qmd memory startup initialization failed for agent "main": Cannot find package 'chokidar' imported from .../dist/manager-C6O7HXGc.js

Root cause

package.json declares:

"chokidar": "^5.0.0"

But the bundled dist files use a default import:

// dist/qmd-manager-FuXCtSYP.js (and 4 other dist files)
import chokidar from "chokidar";
// ...
this.watcher = chokidar.watch(Array.from(watchPaths), { ... });

[email protected] is "type": "module" and its exports field exposes only:

"exports": {
  ".": { "default": "./index.js" },
  "./handler.js": { "default": "./handler.js" }
}

The named watch export and FSWatcher are exposed, but the default export changed in v5 — import chokidar from "chokidar" no longer yields an object with a .watch() method via the dist/ ESM bundle's resolution path. Result: chokidar resolves but is not the expected shape, and Node emits Cannot find package 'chokidar' / Did you mean to import "chokidar/index.js"? warnings before the import fails.

This breaks 5 dist files:

dist/server-plugin-bootstrap-CqofqB0r.js
dist/refresh-CFfbjczz.js
dist/server.impl-C1dgKTkE.js
dist/manager-C6O7HXGc.js
dist/qmd-manager-FuXCtSYP.js

The qmd-manager failure cascades into the embedded agent's context assembly, which then sends an empty messages array to the LLM provider — explaining the "messages: at least one message is required" 400 from Anthropic on every heartbeat and every inbound Teams message.

Reproduction

  1. Have a healthy 2026.4.24 install with 8 plugins loading.
  2. npm install -g [email protected]
  3. openclaw gateway restart
  4. Observe [gateway] ready (3 plugins: ...) and stderr qmd memory unavailable.
  5. Send a DM through any messaging plugin (msteams in our case) — bot receives it, agent never replies.

Workarounds attempted (not sufficient)

  • Pinning [email protected] in plugin-runtime-deps package.json — gateway's bundled-deps stager re-installs [email protected] per the OpenClaw package.json spec on next boot, reverting the pin.
  • Patching all 5 dist files with import * as chokidar from "chokidar" — reduced chokidar resolution errors but did not restore the missing 5 plugins or fix the "messages empty" downstream agent-context failure. Patches are also clobbered on next npm install -g openclaw.

Working fix

Rollback to 2026.4.24:

npm install -g [email protected]
openclaw gateway restart
  • Plugin set restored to 8.
  • Embedded agent / heartbeat lane recovered.
  • Teams DMs reply normally again.

Suggested upstream fix

Either:

  1. Pin chokidar to ^3.6.0 in package.json (chokidar@3 still has the default export shape the bundle expects), or
  2. Update the bundle to use named imports (import { watch, FSWatcher } from "chokidar") compatible with chokidar@5+.

Option 2 is the more durable fix.

Severity

High. Any user upgrading to 2026.4.25 loses messaging-channel functionality silently (DMs are received but get no reply), most plugins fail to load, and heartbeat-driven cron work breaks. Rollback is straightforward but the failure mode is not obvious from the surface symptom (Teams "doesn't work").

Sidenote

The failure mode also masks API key exposure risk: while debugging, it's tempting to inspect ~/.openclaw/agents/<agent>/agent/auth-profiles.json which contains provider API keys in cleartext. Worth considering adding a redaction layer or pointer to a secrets manager when the agent's auth path is read for diagnostic purposes.

extent analysis

TL;DR

The most likely fix is to update the bundle to use named imports compatible with chokidar@5+ or pin chokidar to ^3.6.0 in package.json.

Guidance

  • Verify the issue by checking the plugin set and heartbeat lane after upgrading to 2026.4.25.
  • To mitigate the issue, rollback to 2026.4.24 using npm install -g [email protected] and openclaw gateway restart.
  • Consider updating the bundle to use named imports (import { watch, FSWatcher } from "chokidar") for a more durable fix.
  • If updating the bundle is not feasible, pinning chokidar to ^3.6.0 in package.json can also resolve the issue.

Example

// Update the bundle to use named imports
import { watch, FSWatcher } from "chokidar";
// ...
this.watcher = watch(Array.from(watchPaths), { ... });

Notes

The issue is specific to OpenClaw version 2026.4.25 and chokidar version 5.0.0. The suggested fixes may not apply to other versions or environments.

Recommendation

Apply the workaround by rolling back to 2026.4.24 until a more durable fix is available, as it is a straightforward and effective 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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING