openclaw - 💡(How to fix) Fix Windows: ESM loader path failure — C:\ paths break channel and plugin 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#72231Fetched 2026-04-27 05:32:55
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
closed ×1commented ×1

After updating to 2026.4.24, multiple OpenClaw loaders fail on Windows because raw Windows paths () are passed to Node's ESM loader, which requires URLs. This breaks Discord channel startup, browser plugin service, and other bundled loaders.

Error Message

\
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

Description

After updating to 2026.4.24, multiple OpenClaw loaders fail on Windows because raw Windows paths () are passed to Node's ESM loader, which requires URLs. This breaks Discord channel startup, browser plugin service, and other bundled loaders.

RAW_BUFFERClick to expand / collapse

Environment

  • Windows 10 (22H2), Node v22.22.0, OpenClaw 2026.4.24
  • Upgraded from 2026.4.1 via npm global install

Description

After updating to 2026.4.24, multiple OpenClaw loaders fail on Windows because raw Windows paths () are passed to Node's ESM loader, which requires URLs. This breaks Discord channel startup, browser plugin service, and other bundled loaders.

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:' \\

Affected files (8 loaders)

  • \ acade-loader-*.js\
  • \public-surface-loader-*.js\
  • \undled-plugin-metadata-*.js\
  • \doctor-contract-registry-*.js\
  • \sdk-alias-*.js\
  • \channel-entry-contract-*.js\
  • \undled-*.js\
  • \provider-discovery.runtime-*.js\

Local fix applied

Added path-to-URL conversion (` → \ ile:///C:/...) before passing to Jiti/ESM loader in all 8 files. Also disabled \ ryNative\ Jiti preference on Windows in \sdk-alias-*.js.

Impact

This breaks on ANY Windows install. Discord, browser plugin, and other channels that go through these loaders cannot start.

extent analysis

TL;DR

Converting raw Windows paths to valid file:// URLs before passing them to Node's ESM loader may resolve the issue.

Guidance

  • Verify that all affected loaders are correctly converting Windows paths to file:// URLs, as done in the local fix.
  • Check the sdk-alias-*.js file to ensure the tryNative Jiti preference is disabled on Windows.
  • Review the code changes made in the local fix to ensure they are applied consistently across all 8 affected loaders.
  • Consider creating a centralized function or utility to handle path-to-URL conversions to avoid duplicated code and ensure consistency.

Example

const path = require('path');
const url = require('url');

function convertPathToUrl(filePath) {
  return url.pathToFileURL(path.resolve(filePath));
}

// Usage:
const windowsPath = 'C:\\\\\\path\\\\to\\\\file.js';
const urlPath = convertPathToUrl(windowsPath);

Notes

The provided local fix suggests that converting Windows paths to file:// URLs resolves the issue. However, it is essential to verify that this fix is applied consistently across all affected loaders.

Recommendation

Apply the workaround by converting raw Windows paths to valid file:// URLs, as this has been shown to resolve the issue in the local fix.

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