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

error in version 17.0 and above #186

Open
hubaishan opened this issue Apr 14, 2024 · 1 comment
Open

error in version 17.0 and above #186

hubaishan opened this issue Apr 14, 2024 · 1 comment

Comments

@hubaishan
Copy link

I got this 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 'd:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:239:11)
    at defaultLoad (node:internal/modules/esm/load:130:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:403:13)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:56)
    at new ModuleJob (node:internal/modules/esm/module_job:67:26)
    at #createModuleJob (node:internal/modules/esm/loader:297:17)
    at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:254:34)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:235:17)
    at async ModuleLoader.import (node:internal/modules/esm/loader:322:23) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

for command

wd ee newQ.json

version 16.3.3 runs the command without errors

  • wikibase-cli version: 17.0.0-18.0.1<!-- the latest version, right? :D >
  • OS version:windows 10 x64
  • Node version: 20.12.2
@maxlath
Copy link
Owner

maxlath commented Apr 14, 2024

This looks like a windows-specific issue. The stack trace doesn't inform us much on where to start investigating, but I think this is likely coming from within object_arg_parser.js: maybe getAbsoluteFilePath produces some non-windows-friendly path, leading readJsonFile to fail to get the JSON file, triggering the fallback to getDataFromJsModule, which fails. I don't have access to a windows machine: could you clone the repo locally and try to investigate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants