Skip to content

Conversation

@jderochervlk
Copy link
Contributor

The extension was failing to correctly resolve the path on Windows.

node:internal/modules/esm/load:188
    throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, schemes);
          ^

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

Adding fileURLToPath uses node's built in way to normalize the file URL so it works across platforms.

...as well as ensuring a cross-platform valid absolute path string

@jderochervlk
Copy link
Contributor Author

I tested this out on Windows and the extension now works.

@nojaf nojaf merged commit 0326ae7 into rescript-lang:master Feb 2, 2026
6 checks passed
@jderochervlk jderochervlk deleted the vlk/fix-windows-path branch February 2, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants