openclaw - 💡(How to fix) Fix [Bug]: Bug Report — OpenClaw 2026.4.24 : Cascading ENOTEMPTY Errors on Gateway Startup [2 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#72270Fetched 2026-04-27 05:32:16
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2mentioned ×2closed ×1

Summary On gateway startup, OpenClaw 2026.4.24 fails to load most bundled channels (slack, telegram, nextcloud-talk, synology-chat, tlon, twitch, zalo, zalouser) with cascading ENOTEMPTY errors. The telegram plugin also fails during its register phase. The gateway starts but reports 0 plugins instead of 1 plugin: telegram, rendering the bot completely inoperable.

Error Message

[channels] failed to load bundled channel slack: npm error code ENOTEMPTY npm error syscall rename npm error path /home/<user>/node_modules/abort-controller npm error dest /home/<user>/node_modules/.abort-controller-KutZrACr npm error errno -39 npm error ENOTEMPTY: directory not empty, rename '...' -> '...' [plugins] telegram failed during register: Error: npm error code ENOTEMPTY npm error path /home/<user>/node_modules/gtoken npm error dest /home/<user>/node_modules/.gtoken-e0XeLlFE [channels] failed to load bundled channel slack: npm error code ENOTEMPTY npm error syscall rename npm error path /home/<user>/node_modules/abort-controller npm error dest /home/<user>/node_modules/.abort-controller-KutZrACr npm error errno -39 npm error ENOTEMPTY: directory not empty, rename '...' -> '...' [plugins] telegram failed during register: Error: npm error code ENOTEMPTY npm error path /home/<user>/node_modules/gtoken npm error dest /home/<user>/node_modules/.gtoken-e0XeLlFE Note: The list of conflicting packages may vary depending on the machine's configuration. To identify which packages to remove, search the logs for lines matching npm error path /home/<user>/node_modules/<package>.

Root Cause

Summary On gateway startup, OpenClaw 2026.4.24 fails to load most bundled channels (slack, telegram, nextcloud-talk, synology-chat, tlon, twitch, zalo, zalouser) with cascading ENOTEMPTY errors. The telegram plugin also fails during its register phase. The gateway starts but reports 0 plugins instead of 1 plugin: telegram, rendering the bot completely inoperable.

Fix Action

Fix / Workaround

Workaround (until 2026.4.25) Create a startup script that cleans conflicting packages and ghost directories before launching the gateway: bash#!/bin/bash

/home/<user>/openclaw-start.sh

Expected behavior after workaround ready (1 plugin: telegram; ~80s) starting channels and sidecars... [default] starting provider (@<BotName>)

The fix is confirmed merged on main (not yet in a stable release at the time of this report) The workaround must be re-run on every gateway restart (recommended: integrate into the systemd service or startup script) The initial npm install after cleanup can take 10–15 minutes (60+ packages including matrix-js-sdk, playwright-core, pdfjs-dist) The WebSocket probe (Connectivity probe: failed / timeout) may remain failed even when the gateway is actually functional — it is not a reliable health indicator in this version

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Summary On gateway startup, OpenClaw 2026.4.24 fails to load most bundled channels (slack, telegram, nextcloud-talk, synology-chat, tlon, twitch, zalo, zalouser) with cascading ENOTEMPTY errors. The telegram plugin also fails during its register phase. The gateway starts but reports 0 plugins instead of 1 plugin: telegram, rendering the bot completely inoperable.

Steps to reproduce

Symptoms Log errors (/tmp/openclaw/openclaw-YYYY-MM-DD.log) [channels] failed to load bundled channel slack: npm error code ENOTEMPTY npm error syscall rename npm error path /home/<user>/node_modules/abort-controller npm error dest /home/<user>/node_modules/.abort-controller-KutZrACr npm error errno -39 npm error ENOTEMPTY: directory not empty, rename '...' -> '...'

[plugins] telegram failed during register: Error: npm error code ENOTEMPTY npm error path /home/<user>/node_modules/gtoken npm error dest /home/<user>/node_modules/.gtoken-e0XeLlFE

Expected behavior

access to telegram bot and groups and topics

Actual behavior

Symptoms Log errors (/tmp/openclaw/openclaw-YYYY-MM-DD.log) [channels] failed to load bundled channel slack: npm error code ENOTEMPTY npm error syscall rename npm error path /home/<user>/node_modules/abort-controller npm error dest /home/<user>/node_modules/.abort-controller-KutZrACr npm error errno -39 npm error ENOTEMPTY: directory not empty, rename '...' -> '...'

[plugins] telegram failed during register: Error: npm error code ENOTEMPTY npm error path /home/<user>/node_modules/gtoken npm error dest /home/<user>/node_modules/.gtoken-e0XeLlFE Conflicting packages identified The following packages under ~/node_modules/ conflict with the npm rename mechanism used by OpenClaw:

abort-controller form-data gtoken image-q another-json accepts gaxios @agentclientprotocol/sdk @tloncorp/tlon-skill

OpenClaw version

2026.4.24 (cbcfdf6)

Operating system

Ubuntu Linux 6.17.0 x64

Install method

npm

Model

haiku

Provider / routing chain

openclaw gateway telegram

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

oot Cause Confirmed bug in OpenClaw 2026.4.24's handling of shared node_modules (~/node_modules/). When OpenClaw attempts to install or update its bundled dependencies, npm tries to rename existing directories to temporary names (.package-XXXXXXXX), but fails if those directories already contain files (errno -39 = ENOTEMPTY).

Workaround (until 2026.4.25) Create a startup script that cleans conflicting packages and ghost directories before launching the gateway: bash#!/bin/bash

/home/<user>/openclaw-start.sh

echo "🦞 Cleaning conflicting packages..."

rm -rf ~/node_modules/form-data
~/node_modules/abort-controller
~/node_modules/image-q
~/node_modules/another-json
~/node_modules/accepts
~/node_modules/gaxios
~/node_modules/gtoken
~/node_modules/@agentclientprotocol
~/node_modules/@tloncorp
~/node_modules/.abort-controller-*
~/node_modules/.form-data-*
~/node_modules/.gtoken-*

echo "✅ Cleanup done, starting gateway..." openclaw gateway start Note: The list of conflicting packages may vary depending on the machine's configuration. To identify which packages to remove, search the logs for lines matching npm error path /home/<user>/node_modules/<package>.

Expected behavior after workaround ready (1 plugin: telegram; ~80s) starting channels and sidecars... [default] starting provider (@<BotName>)

Impact

Gateway starts with 0 plugins → Telegram bot inoperable Bundled channels (slack, nextcloud-talk, synology-chat, etc.) fail to load Successive restarts fail if ghost directories are not cleaned up first

Additional Notes

The fix is confirmed merged on main (not yet in a stable release at the time of this report) The workaround must be re-run on every gateway restart (recommended: integrate into the systemd service or startup script) The initial npm install after cleanup can take 10–15 minutes (60+ packages including matrix-js-sdk, playwright-core, pdfjs-dist) The WebSocket probe (Connectivity probe: failed / timeout) may remain failed even when the gateway is actually functional — it is not a reliable health indicator in this version

Report generated following a debugging session on 2026-04-26.

extent analysis

TL;DR

The most likely fix is to create a startup script that cleans conflicting packages and ghost directories before launching the OpenClaw gateway.

Guidance

  • Identify conflicting packages by searching the logs for lines matching npm error path /home/<user>/node_modules/<package>.
  • Remove the conflicting packages and ghost directories using the provided bash script or a similar cleanup process.
  • Integrate the cleanup script into the systemd service or startup script to ensure it runs on every gateway restart.
  • Be aware that the initial npm install after cleanup can take 10-15 minutes.

Example

#!/bin/bash
# /home/<user>/openclaw-start.sh

echo " Cleaning conflicting packages..."

rm -rf ~/node_modules/form-data \
       ~/node_modules/abort-controller \
       ~/node_modules/image-q \
       ~/node_modules/another-json \
       ~/node_modules/accepts \
       ~/node_modules/gaxios \
       ~/node_modules/gtoken \
       ~/node_modules/@agentclientprotocol \
       ~/node_modules/@tloncorp \
       ~/node_modules/.abort-controller-* \
       ~/node_modules/.form-data-* \
       ~/node_modules/.gtoken-*

echo " Cleanup done, starting gateway..."
openclaw gateway start

Notes

The provided workaround is temporary until the fix is released in version 2026.4.25. The WebSocket probe may remain failed even when the gateway is functional, so it's not a reliable health indicator in this version.

Recommendation

Apply the provided workaround by creating a startup script to clean conflicting packages and ghost directories before launching the OpenClaw gateway, as this is the most straightforward solution until the fixed version is released.

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

access to telegram bot and groups and topics

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]: Bug Report — OpenClaw 2026.4.24 : Cascading ENOTEMPTY Errors on Gateway Startup [2 comments, 3 participants]