Got errors in VSCode when opeining a fresh project created via npm create rescript-app@latest right now, saying that the server has crashed 5 times. All the errors are the same:
[Info - 4:54:16 PM] Received initialize request from client.
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 'd:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:188:11)
at defaultLoad (node:internal/modules/esm/load:82:3)
at ModuleLoader.load (node:internal/modules/esm/loader:815:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:594:31)
at #createModuleJob (node:internal/modules/esm/loader:624:36)
at #getJobFromResolveResult (node:internal/modules/esm/loader:343:34)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:311:41)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:664:25) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
Node.js v22.21.1
[Info - 4:54:16 PM] Connection to server got closed. Server will restart.
true
It’s saying that some path starts with d:/, which would be correct for a path starting with a drive letter on Windows, and the project is indeed somewhere on the D drive. But it looks like a URL scheme was expected instead, and d:/ is rightfully considered to be an incorrect one. Looks like path management is a bit broken somewhere.
I’m not sure if this problem is more of the VSCode extension or some other part of tooling, so I figured I best ask here first.