chrome-devtools-mcp icon indicating copy to clipboard operation
chrome-devtools-mcp copied to clipboard

npm run eval fails on Windows with ERR_UNSUPPORTED_ESM_URL_SCHEME

Open passtas opened this issue 9 months ago • 0 comments

Description of the bug

Running npm run eval on Windows fails immediately with two cross-platform issues:

  1. eval_gemini.ts calls await import(scenarioPath) with a Windows absolute path (e.g. D:\projects...\console_test.ts). Node.js ESM loader on Windows requires file:// URLs, not bare drive-letter paths, causing ERR_UNSUPPORTED_ESM_URL_SCHEME.
  2. The eval npm script uses CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=true node ..., which is Unix-only shell syntax and fails on Windows (cmd/PowerShell).

Reproduction

  1. Clone the repo on Windows
  2. Run npm run build
  3. Run npm run eval -- scripts/eval_scenarios/console_test.ts --debug
  4. Observe 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:'

Expectation

npm run eval should work on Windows the same as on Linux/macOS.

MCP configuration

N/A - issue is in the eval script, not the MCP server itself.

Chrome DevTools MCP version

0.17.3

Chrome version

No response

Coding agent version

No response

Model version

No response

Chat log

No response

Node version

v22.16.0

Operating system

Windows

Extra checklist

  • [x] I want to provide a PR to fix this bug

passtas avatar Feb 24 '26 12:02 passtas