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:
- Install Node.js on Windows.
- Install
checkmateai globally: npm install -g checkmateai
- Attempt to run a CLI command, for example:
npx checkmate setup-mcp or npx checkmateai init
- 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.
The bug
When attempting to use the
checkmateaiCLI (e.g.,npx checkmate setup-mcpornpx checkmateai init) on native Windows, it fails with anERR_UNSUPPORTED_ESM_URL_SCHEMEerror.To Reproduce
Steps to reproduce the behavior on native Windows:
checkmateaiglobally:npm install -g checkmateainpx checkmate setup-mcpornpx checkmateai initExpected 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_SCHEMEfor ac:protocol is the key part).Environment (Native Windows):
checkmateaiVersion: (Please runnpm list -g checkmateai --depth=0and paste the version here)WSL (Working Behavior):
checkmateaiCLI (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 likenpx checkmateai initexecute without theERR_UNSUPPORTED_ESM_URL_SCHEMEerror.Additional context (Native Windows):
checkmateaion my native Windows system isC:\Users\[UserName]\AppData\Roaming\npm\node_modules\checkmateai.mcp.jsonfile directly (pointing todist/mcp/index.jswithin the globalcheckmateaiinstallation 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.