openclaw - 💡(How to fix) Fix Channel plugins fail to load on Windows + Node 25: ERR_UNSUPPORTED_ESM_URL_SCHEME (received protocol 'c:') [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#72221Fetched 2026-04-27 05:33:07
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1cross-referenced ×1

On Windows with Node.js v25, channel plugins (Telegram, WhatsApp) fail to initialize because the dynamic import() in the channel loader is given a raw absolute path like C:\path\to\module.js instead of a file:///C:/... URL. Node v25 removed the legacy fallback for absolute path imports, so the loader throws.

Error Message

Telegram default: enabled, configured, stopped, mode:polling, error: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

Root Cause

On Windows with Node.js v25, channel plugins (Telegram, WhatsApp) fail to initialize because the dynamic import() in the channel loader is given a raw absolute path like C:\path\to\module.js instead of a file:///C:/... URL. Node v25 removed the legacy fallback for absolute path imports, so the loader throws.

Fix Action

Workaround

Downgrade to Node 22 LTS, which still tolerates the legacy absolute path import on Windows.

Code Example

Telegram default: enabled, configured, stopped, mode:polling,
error: Only URLs with a scheme in: file, data, and node are supported
by the default ESM loader. On Windows, absolute paths must be valid
file:// URLs. Received protocol 'c:'

---

openclaw channels login --channel whatsapp --verbose

---

Channel login failed: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs
with a scheme in: file, data, and node are supported by the default ESM
loader. On Windows, absolute paths must be valid file:// URLs.
Received protocol 'c:'

---

import { pathToFileURL } from 'node:url';
await import(pathToFileURL(absolutePath).href);
RAW_BUFFERClick to expand / collapse

Summary

On Windows with Node.js v25, channel plugins (Telegram, WhatsApp) fail to initialize because the dynamic import() in the channel loader is given a raw absolute path like C:\path\to\module.js instead of a file:///C:/... URL. Node v25 removed the legacy fallback for absolute path imports, so the loader throws.

Environment

  • OS: Windows 10/11
  • Node: v25.9.0
  • OpenClaw: 2026.4.24 (cbcfdf6)
  • Install: global via npm (%APPDATA%\npm\node_modules\openclaw)

Steps to reproduce

  1. openclaw channels add --channel telegram --token <bot_token>
  2. openclaw gateway install (as admin) and openclaw gateway start
  3. openclaw channels status

Result:

Telegram default: enabled, configured, stopped, mode:polling,
error: Only URLs with a scheme in: file, data, and node are supported
by the default ESM loader. On Windows, absolute paths must be valid
file:// URLs. Received protocol 'c:'

Same error reproduces with WhatsApp via:

openclaw channels login --channel whatsapp --verbose

After Baileys/Jimp bundled deps are installed:

Channel login failed: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs
with a scheme in: file, data, and node are supported by the default ESM
loader. On Windows, absolute paths must be valid file:// URLs.
Received protocol 'c:'

Expected

Channel plugins load successfully on Windows + Node 25.

Likely fix

Convert absolute paths to file:// URLs before passing to dynamic import() in the channel/plugin loader. Node provides a helper:

import { pathToFileURL } from 'node:url';
await import(pathToFileURL(absolutePath).href);

This works on all Node versions and platforms.

Workaround

Downgrade to Node 22 LTS, which still tolerates the legacy absolute path import on Windows.

Notes

  • Bonjour plugin also unstable on Windows (separate CIAO PROBING CANCELLED unhandled rejection during mDNS probing) — happy to file that separately if useful.
  • Web chat works fine; only channel plugins are affected.

extent analysis

TL;DR

Convert absolute paths to file:// URLs before passing to dynamic import() in the channel/plugin loader to fix the issue.

Guidance

  • Use the pathToFileURL function from the node:url module to convert absolute paths to file:// URLs, as shown in the provided example code.
  • Verify that the channel plugins load successfully after making this change by running the openclaw channels status command.
  • If downgrading to Node 22 LTS is a temporary solution, consider upgrading to a version that supports the file:// URL scheme for absolute paths.
  • Test the fix on different platforms and Node versions to ensure compatibility.

Example

import { pathToFileURL } from 'node:url';
const absolutePath = 'C:\\path\\to\\module.js';
const fileUrl = pathToFileURL(absolutePath);
await import(fileUrl.href);

Notes

The provided fix should work on all Node versions and platforms, but it's essential to test it thoroughly to ensure compatibility.

Recommendation

Apply the workaround by converting absolute paths to file:// URLs, as this is a more future-proof solution than downgrading to Node 22 LTS.

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 Channel plugins fail to load on Windows + Node 25: ERR_UNSUPPORTED_ESM_URL_SCHEME (received protocol 'c:') [2 comments, 3 participants]