Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows, absolute paths must be valid file:// URLs. #234

Open
2gua opened this issue Oct 21, 2021 · 1 comment
Open

On Windows, absolute paths must be valid file:// URLs. #234

2gua opened this issue Oct 21, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@2gua
Copy link

2gua commented Oct 21, 2021

Describe the bug

When running "clio run" on Windows, the following bug appears:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
at new NodeError (node:internal/errors:371:5)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ESMLoader.import (node:internal/modules/esm/loader:276:22)
at importModuleDynamically (node:internal/modules/esm/translators:111:35)
at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
at file:///D:/.../build/node_modules/clio-run/src/workers/wt.js:14:19
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
Emitted 'error' event on Worker instance at:
at Worker.[kOnErrorMessage] (node:internal/worker:289:10)
at Worker.[kOnMessage] (node:internal/worker:300:37)
at MessagePort. (node:internal/worker:201:57)
at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:562:20)
at MessagePort.exports.emitMessage (node:internal/per_context/messageport:23:28) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'

Temporary solutions

.../build/node_modules/clio-run/src/workers/wt.js:
import(workerData.file) to import("file://" + workerData.file)

.../build/node_modules/clio-run/src/runners/wt.js:
import(file) to import("file://" + file)

@2gua 2gua added the bug Something isn't working label Oct 21, 2021
@2gua 2gua changed the title n Windows, absolute paths must be valid file:// URLs. On Windows, absolute paths must be valid file:// URLs. Oct 21, 2021
@pouya-eghbali
Copy link
Member

Hi, thanks for reporting! I will work on this as a part of the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants