Skip to content

bug(windows): ERR_UNSUPPORTED_ESM_URL_SCHEME #355

Description

@Kristinita

1. Summary

I can’t begin to use fetch-github-release on Windows. I get the error ERR_UNSUPPORTED_ESM_URL_SCHEME.

2. Steps to reproduce

npm install --save-dev @terascope/fetch-github-release

npx fetch-github-release --version

3. Behavior

3.1. Expected — Ubuntu

Look at the Travis CI build:

$ npx fetch-github-release --version

1.0.0

(Possible bug — correct version is 2.0.0, not 1.0.0)

3.2. Bug — Windows

Look at the AppVeyor CI build:

npx fetch-github-release --version
(node:7116) ExperimentalWarning: CommonJS module C:\Program Files\nodejs\node_modules\npm\node_modules\debug\src\node.js is loading ES Module C:\Program Files\nodejs\node_modules\npm\node_modules\supports-color\index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings …` to show where the warning was created)
node:internal/modules/esm/load:209
    throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, schemes);
          ^
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 'c:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:209:11)
    at defaultLoad (node:internal/modules/esm/load:107:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:670:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:483:43)
    at #createModuleJob (node:internal/modules/esm/loader:507:36)
    at #getJobFromResolveResult (node:internal/modules/esm/loader:275:34)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:243:41)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:546:25) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
Node.js v23.2.0
Command exited with code 1

4. Environment

  1. Local

    1. Microsoft Windows 11 [Version 10.0.22621.3085]
    2. Node.js v23.9.0
  2. AppVeyor

    1. Windows Server 2019
    2. Node.js v23.2.0
  3. Travis

    1. Ubuntu 22.04.5 LTS Jammy
    2. Node.js v23.9.0

Thanks.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions