Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ function getExtensionApiImportSpecifiers(): string[] {
specifiers.push(toImportSpecifier("/usr/local/lib/node_modules/openclaw/dist/extensionAPI.js"));
specifiers.push(toImportSpecifier("/opt/homebrew/lib/node_modules/openclaw/dist/extensionAPI.js"));

if (process.platform === "win32" && process.env.APPDATA) {
const windowsNpmPath = join(process.env.APPDATA, "npm", "node_modules", "openclaw", "dist", "extensionAPI.js");
specifiers.push(toImportSpecifier(windowsNpmPath));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Convert Windows fallback path into a file URL

This fallback still won’t load on Windows because toImportSpecifier() only converts POSIX absolute paths (starting with /) to file:// URLs, so an APPDATA path like C:\Users\...\extensionAPI.js is returned unchanged. In loadEmbeddedPiRunner(), import(specifier) then interprets C: as a URL scheme and fails (typically ERR_UNSUPPORTED_ESM_URL_SCHEME), meaning the new Windows probe cannot succeed unless OPENCLAW_EXTENSION_API_PATH is manually set to a valid import specifier.

Useful? React with 👍 / 👎.

}

return [...new Set(specifiers.filter(Boolean))];
}

Expand Down
Loading