[BUG] Windows: All install methods (npm/ps1/cmd/winget) fail with "defines.json" Syntax Error referencing C:\Program Files\nodejs
Status Open
Maintainer reply None cached
Activity 2 comments · opened Aug 11, 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?
Claude Code fails to install/run on Windows across every installation method, with a Syntax Error in defines.json referencing a hardcoded Node.js path.
What Should Happen?
Claude Code should install and run successfully without referencing a hardcoded or unsubstituted Node.js path.
Error Messages/Logs
1 | "C:\Program Files\nodejs"
^
error: Syntax Error
at defines.json:1:1
(On one occasion, seen with an unsubstituted template placeholder instead of the drive letter:)
1 | "<drv>:\Program Files\nodejs"
^
error: Syntax Error
at defines.json:1:1
Steps to Reproduce
- On Windows, run any of the following install methods:
- npm install -g @anthropic-ai/claude-code
- irm https://claude.ai/install.ps1 | iex
- curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd
- winget install Anthropic.ClaudeCode
- Run
claude --version(or attempt to run claude at all) - The defines.json Syntax Error appears every time, regardless of install method
Additional troubleshooting already performed (issue persists in all cases):
- Uninstalled Node.js completely and rebooted — error still occurs, even though C:\Program Files\nodejs no longer exists on disk
- Temporarily removed nodejs from PATH — no change
- Verified %SystemDrive% returns "C:" correctly
Claude Model
_No response_
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Unknown — claude --version cannot run due to this bug
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗