Skip to content

ERR_UNSUPPORTED_ESM_URL_SCHEME when running checkmateai CLI on Windows #3

@apoorv0220

Description

@apoorv0220

The bug
When attempting to use the checkmateai CLI (e.g., npx checkmate setup-mcp or npx checkmateai init) on native Windows, it fails with an ERR_UNSUPPORTED_ESM_URL_SCHEME error.

To Reproduce
Steps to reproduce the behavior on native Windows:

  1. Install Node.js on Windows.
  2. Install checkmateai globally: npm install -g checkmateai
  3. Attempt to run a CLI command, for example: npx checkmate setup-mcp or npx checkmateai init
  4. See error.

Expected behavior
The CLI command should execute successfully on native Windows, allowing for project initialization or MCP setup, similar to its behavior in other environments.

Actual behavior
The command fails with the following error on native Windows:

The command fails with the following error on native Windows:
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 'c:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:108:11)
at defaultLoad (node:internal/modules/esm/load:130:3)
at ModuleLoader.load (node:internal/modules/esm/loader:409:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:290:51)
at new ModuleJob (node:internal/modules/esm/module_job:67:26)
at #createModuleJob (node:internal/modules/esm/loader:309:17)
at #loadModule (node:internal/modules/esm/loader:265:22)
at #importModuleDynamically (node:internal/modules/esm/loader:374:22)
at importModuleDynamicallyCallback (node:internal/modules/esm/loader:346:21)
at new Promise () {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

(Note: The exact stack trace might vary slightly, but the core ERR_UNSUPPORTED_ESM_URL_SCHEME for a c: protocol is the key part).

Environment (Native Windows):

  • OS: Windows 10 (Version 10.0.19045)
  • Node.js Version: v24.1.0
  • checkmateai Version: (Please run npm list -g checkmateai --depth=0 and paste the version here)

WSL (Working Behavior):

  • Notably, the checkmateai CLI (using the same global installation or a separate one within WSL) works correctly when run from within a WSL (Windows Subsystem for Linux) environment on the same machine. Commands like npx checkmateai init execute without the ERR_UNSUPPORTED_ESM_URL_SCHEME error.
  • This suggests the issue is specific to the native Windows execution environment and likely related to path handling or ES Module resolution differences between Node.js on Windows and Node.js on Linux/WSL.

Additional context (Native Windows):

  • The global installation path for checkmateai on my native Windows system is C:\Users\[UserName]\AppData\Roaming\npm\node_modules\checkmateai.
  • Manual setup of Checkmate for Cursor by editing the mcp.json file directly (pointing to dist/mcp/index.js within the global checkmateai installation on Windows) works as expected. This further suggests the issue is specific to the CLI's execution mechanism on native Windows rather than a fundamental incompatibility of the core library files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions