openclaw - 💡(How to fix) Fix [Bug]: 2026.4.24 regression — ENOTEMPTY on bundled plugin-sdk causes feishu (and potentially all bundled channels) to fail loading [1 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#71802Fetched 2026-04-26 05:08:07
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
cross-referenced ×2closed ×1commented ×1

Error Message

[channels] failed to load bundled channel feishu: ENOTEMPTY: directory not empty, rmdir /Users/Colin/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-908e4c40dcb0/dist/extensions/node_modules/openclaw/plugin-sdk

Root Cause

  • The bundled runtime dependency repair flow attempts to clean up the plugin-sdk directory using fs.rmdir() (non-recursive)
  • plugin-sdk contains 300+ JS files, making it non-empty
  • Non-recursive rmdir cannot delete non-empty directories → ENOTEMPTY error
  • This blocks all subsequent plugin loading for any channel that depends on plugin-sdk
  • Feishu happens to be the first bundled channel loaded, so it appears in the error message, but this is not a feishu-specific bug — it is a core OpenClaw plugin dependency repair bug

Fix Action

Workaround

Replace the plugin-sdk directory with a symlink to the main installation package:

rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/extensions/node_modules/openclaw/plugin-sdk
ln -s /Users/Colin/.openclaw/lib/node_modules/openclaw/dist/plugin-sdk ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/extensions/node_modules/openclaw/plugin-sdk
openclaw gateway restart

This works because unlink() on a symlink does not trigger ENOTEMPTY.

Code Example

[channels] failed to load bundled channel feishu: ENOTEMPTY: directory not empty, rmdir /Users/Colin/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-908e4c40dcb0/dist/extensions/node_modules/openclaw/plugin-sdk

---

rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/extensions/node_modules/openclaw/plugin-sdk
ln -s /Users/Colin/.openclaw/lib/node_modules/openclaw/dist/plugin-sdk ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/extensions/node_modules/openclaw/plugin-sdk
openclaw gateway restart
RAW_BUFFERClick to expand / collapse

Bug Summary

After upgrading to OpenClaw 2026.4.24, the bundled runtime dependency repair logic uses non-recursive fs.rmdir() to remove the plugin-sdk directory, which contains 300+ files. This causes ENOTEMPTY error on every startup, preventing feishu (and potentially all bundled channel plugins) from loading.

Error Message

[channels] failed to load bundled channel feishu: ENOTEMPTY: directory not empty, rmdir /Users/Colin/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-908e4c40dcb0/dist/extensions/node_modules/openclaw/plugin-sdk

Reproduction Steps

  1. Install/upgrade to OpenClaw 2026.4.24 via npm
  2. Start gateway: openclaw gateway start
  3. Observe ENOTEMPTY error in logs — feishu channel fails to load
  4. Deleting plugin-runtime-deps and restarting does NOT fix the issue — the directory is recreated with the same structure and the same error recurs

Root Cause Analysis

  • The bundled runtime dependency repair flow attempts to clean up the plugin-sdk directory using fs.rmdir() (non-recursive)
  • plugin-sdk contains 300+ JS files, making it non-empty
  • Non-recursive rmdir cannot delete non-empty directories → ENOTEMPTY error
  • This blocks all subsequent plugin loading for any channel that depends on plugin-sdk
  • Feishu happens to be the first bundled channel loaded, so it appears in the error message, but this is not a feishu-specific bug — it is a core OpenClaw plugin dependency repair bug

Environment

  • OpenClaw version: 2026.4.24
  • Platform: macOS (Apple Silicon, Darwin 25.4.0)
  • Node.js: v22.22.0
  • Install method: npm global install
  • Previous version did NOT have this issue

Workaround

Replace the plugin-sdk directory with a symlink to the main installation package:

rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/extensions/node_modules/openclaw/plugin-sdk
ln -s /Users/Colin/.openclaw/lib/node_modules/openclaw/dist/plugin-sdk ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-<hash>/dist/extensions/node_modules/openclaw/plugin-sdk
openclaw gateway restart

This works because unlink() on a symlink does not trigger ENOTEMPTY.

Related

  • #70462 appears to address this in the next release with "refresh the packaged plugin SDK alias in place during bundled runtime dependency repair"
  • However, 2026.4.24 does not yet include this fix

Suggested Fix

Use fs.rm(path, { recursive: true }) (Node 14.14+) instead of fs.rmdir() in the bundled runtime dependency repair logic, or better yet, refresh the plugin-sdk alias in place as #70462 proposes.

extent analysis

TL;DR

Replace fs.rmdir() with fs.rm(path, { recursive: true }) in the bundled runtime dependency repair logic to fix the ENOTEMPTY error.

Guidance

  • Verify that the issue is caused by the non-recursive fs.rmdir() call by checking the error message and the directory contents.
  • Apply the provided workaround by replacing the plugin-sdk directory with a symlink to the main installation package to mitigate the issue.
  • Consider upgrading to a future version that includes the fix proposed in #70462, which refreshes the packaged plugin SDK alias in place during bundled runtime dependency repair.
  • If using Node.js version 14.14 or later, use fs.rm(path, { recursive: true }) instead of fs.rmdir() to recursively remove directories.

Example

// Before
fs.rmdir('/path/to/plugin-sdk', (err) => {
  if (err) {
    console.error(err);
  }
});

// After (Node 14.14+)
fs.rm('/path/to/plugin-sdk', { recursive: true }, (err) => {
  if (err) {
    console.error(err);
  }
});

Notes

The provided workaround should resolve the issue, but it may not be a permanent fix. Upgrading to a future version that includes the fix proposed in #70462 is recommended for a more robust solution.

Recommendation

Apply the workaround by replacing the plugin-sdk directory with a symlink to the main installation package, as it provides a temporary solution to the issue.

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

openclaw - 💡(How to fix) Fix [Bug]: 2026.4.24 regression — ENOTEMPTY on bundled plugin-sdk causes feishu (and potentially all bundled channels) to fail loading [1 comments, 2 participants]