[BUG] Claude fails to start on Windows (fine on WSL)
Resolved 💬 4 comments Opened Sep 19, 2025 by mdsomerfield Closed Jan 12, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I try launch claude from a Windows cmd terminal, I get the following error:
file:///C:/Users/somer/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1
SyntaxError: Invalid or unexpected token
at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
at #translate (node:internal/modules/esm/loader:468:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:515:27)
at async ModuleJob._link (node:internal/modules/esm/module_job:115:19)
Node.js v22.14.0
What Should Happen?
Claude startup message should appear.
Error Messages/Logs
file:///C:/Users/somer/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1
SyntaxError: Invalid or unexpected token
at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
at #translate (node:internal/modules/esm/loader:468:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:515:27)
at async ModuleJob._link (node:internal/modules/esm/module_job:115:19)
Node.js v22.14.0
Steps to Reproduce
Enter the command claude on a Windows terminal.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.0.118
Claude Code Version
1.0.119
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
It is fine for my WSL installation on the same machine, so seems Windows-specific. Was also working early today on Windows in version 1.0.118
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗