chrome-devtools-mcp
chrome-devtools-mcp copied to clipboard
npm run eval fails on Windows with ERR_UNSUPPORTED_ESM_URL_SCHEME
Description of the bug
Running npm run eval on Windows fails immediately with two cross-platform issues:
- 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.
- 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
- Clone the repo on Windows
- Run npm run build
- Run npm run eval -- scripts/eval_scenarios/console_test.ts --debug
- 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