openclaw - 💡(How to fix) Fix [Bug]: ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows with Node v22/v24 [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#72302Fetched 2026-04-27 05:31:54
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1

OpenClaw crashes or fails to load subsystems (Health, WhatsApp, Browser, etc.) on Windows when running Node v22 or v24. This is due to a change in the Node.js ESM loader which no longer automatically converts Windows absolute paths (e.g., C:\Users...) into valid file URLs.

The error occurs during dynamic plugin/channel loading or configuration.

Log Output:
text
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:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:195:11)
    at defaultLoadSync (node:internal/modules/esm/load:142:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:781:26)
    ...


Environment:
- OS: Windows 10/11
- Node.js Version: v24.14.1 (and v22.22.2)
- OpenClaw Version: 2026.4.24 (cbcfdf6)

Technical Analysis:
The issue is that OpenClaw is passing raw Windows absolute paths to dynamic import() calls or internal module loaders. Modern Node.js versions strictly require that these paths be formatted as file:/// URLs on Windows.

Suggested Fix:
Wrap local file paths in url.pathToFileURL() before passing them to the ESM loader.

Example change in the plugin/subsystem loader:
javascript
import { pathToFileURL } from 'node:url';

// Instead of:
// await import(absolutePath);

// Use:
await import(pathToFileURL(absolutePath).href);

Error Message

The error occurs during dynamic plugin/channel loading or configuration. Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader.

Root Cause

OpenClaw crashes or fails to load subsystems (Health, WhatsApp, Browser, etc.) on Windows when running Node v22 or v24. This is due to a change in the Node.js ESM loader which no longer automatically converts Windows absolute paths (e.g., C:\Users...) into valid file URLs.

The error occurs during dynamic plugin/channel loading or configuration.

Log Output:
text
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:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:195:11)
    at defaultLoadSync (node:internal/modules/esm/load:142:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:781:26)
    ...


Environment:
- OS: Windows 10/11
- Node.js Version: v24.14.1 (and v22.22.2)
- OpenClaw Version: 2026.4.24 (cbcfdf6)

Technical Analysis:
The issue is that OpenClaw is passing raw Windows absolute paths to dynamic import() calls or internal module loaders. Modern Node.js versions strictly require that these paths be formatted as file:/// URLs on Windows.

Suggested Fix:
Wrap local file paths in url.pathToFileURL() before passing them to the ESM loader.

Example change in the plugin/subsystem loader:
javascript
import { pathToFileURL } from 'node:url';

// Instead of:
// await import(absolutePath);

// Use:
await import(pathToFileURL(absolutePath).href);
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw crashes or fails to load subsystems (Health, WhatsApp, Browser, etc.) on Windows when running Node v22 or v24. This is due to a change in the Node.js ESM loader which no longer automatically converts Windows absolute paths (e.g., C:\Users...) into valid file URLs.

The error occurs during dynamic plugin/channel loading or configuration.

Log Output:
text
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:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:195:11)
    at defaultLoadSync (node:internal/modules/esm/load:142:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:781:26)
    ...


Environment:
- OS: Windows 10/11
- Node.js Version: v24.14.1 (and v22.22.2)
- OpenClaw Version: 2026.4.24 (cbcfdf6)

Technical Analysis:
The issue is that OpenClaw is passing raw Windows absolute paths to dynamic import() calls or internal module loaders. Modern Node.js versions strictly require that these paths be formatted as file:/// URLs on Windows.

Suggested Fix:
Wrap local file paths in url.pathToFileURL() before passing them to the ESM loader.

Example change in the plugin/subsystem loader:
javascript
import { pathToFileURL } from 'node:url';

// Instead of:
// await import(absolutePath);

// Use:
await import(pathToFileURL(absolutePath).href);

Steps to reproduce

update to newest version run openclaw and uninstall and try to do onboarding crashes at channel selection

Expected behavior

just running smoothly

Actual behavior

crashing and lot's of errors.

OpenClaw version

2026.4.24

Operating system

windows 11

Install method

npm global

Model

gemini 3 pro

Provider / routing chain

openclaw api gemini

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Wrap local file paths in url.pathToFileURL() before passing them to the ESM loader to resolve the issue.

Guidance

  • Identify all instances where OpenClaw passes raw Windows absolute paths to dynamic import() calls or internal module loaders.
  • Replace these instances with pathToFileURL(absolutePath).href to ensure paths are formatted as valid file:/// URLs.
  • Verify that the url module is imported correctly, using import { pathToFileURL } from 'node:url';.
  • Test the updated code on Windows with Node.js versions v22 and v24 to confirm the fix.

Example

import { pathToFileURL } from 'node:url';

// Instead of:
// await import(absolutePath);

// Use:
await import(pathToFileURL(absolutePath).href);

Notes

This fix assumes that the issue is solely due to the change in Node.js ESM loader behavior and that wrapping paths with pathToFileURL() will resolve the problem.

Recommendation

Apply the workaround by wrapping local file paths in url.pathToFileURL() to ensure compatibility with modern Node.js versions.

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

just running smoothly

Still need to ship something?

×6

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

Back to top recommendations

TRENDING