Back to Issue home

search optimization

#search-optimization

Sorted by views, then solution_desc, solution, and root_cause length (desc).

2524 issues

[Bug]: ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows — plugin loader passes raw drive-letter paths to import()

OpenClaw version: 2026.4.5 (3e72c03) Node.js version: v22.22.2 (also reproduced on v24.14.0) OS: Windows 11 (10.0.26200) Running openclaw onboard on native Windows crashes immediately after selecting a model. The ESM loader rejects the module specifier because it receives a raw Windows path (C:\...) instead of a file:/// URL. Steps to reproduce 1. Install openclaw globally on Windows: npm install -g openclaw 2. Run openclaw onboard 3. Select Ollama as the provider 4. Select any model (e.g. ollama/gemma4:e4b) Error 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:' Root cause The plugin/extension loader in dist/loader-BkajlJCF.js resolves plugin paths to absolute Windows paths (e.g. C:\Users\...\extensions\openclaw-web-search) and passes them directly to jiti / dynamic import(). On Windows, ESM requires these to be file:///C:/... URLs. Relevant lines in dist/loader-BkajlJCF.js: - Line ~2526: mod = getJiti(safeSource)(safeSource); - Line ~2213: const runtimeModule = getJiti(runtimeModulePath)(runtimeModulePath); Also in dist/io-CS2J_l4V.js: - Line ~161: mod = getJiti(contractSource)(contractSource); Suggested fix Wrap paths with pathToFileURL() before passing to dynamic import: import { pathToFileURL } from 'node:url'; // Before mod = getJiti(safeSource)(safeSource); // After mod = getJiti(safeSource)(pathToFileURL(safeSource).href); Workaround Running openclaw under WSL2 avoids the issue since Linux paths don't have drive letters.