Windows Auto-update Fails with Incorrect Package Path Formatting
Bug Description
Title: Auto-update fails on Windows with incorrect path formatting
Description:
When running claude update on Windows, the auto-update mechanism fails with a path formatting error. The update
process incorrectly inserts backslashes into the npm package name.
Steps to reproduce:
- Run claude update on Windows when an update is available
- Update check succeeds and finds new version
- Installation fails with "Warning: Could not determine installation type"
- Error message suggests incorrect command with backslashes in package name
Expected behavior:
Auto-update should complete successfully without manual intervention
Actual behavior:
Update fails and suggests invalid npm command:
npm update @node_modules\@anthropic-ai\claude-code\
Workaround:
Manual update works correctly:
cd ~/.claude/local && npm update @anthropic-ai/claude-code
Environment:
- OS: Windows (MINGW64_NT-10.0-26100)
- Claude Code version: 1.0.58 (updating to 1.0.59)
- Installation type: Local (~/.claude/local)
Root cause:
The update mechanism appears to have a Windows-specific bug where forward slashes in the npm package name are
incorrectly converted to backslashes, making the suggested command invalid.
-Made with Claude
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 1.0.59
- Feedback ID:
Errors
[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2172\n at Array.map (<anonymous>)\n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2143)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2059\n at Array.map (<anonymous>)\n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2048)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n at Array.map (<anonymous>)\n at $V (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)","timestamp":"2025-07-23T22:31:16.843Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2172\n at Array.map (<anonymous>)\n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2143)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2059\n at Array.map (<anonymous>)\n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:2048)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n at Array.map (<anonymous>)\n at $V (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)","timestamp":"2025-07-23T22:31:16.854Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n at Array.map (<anonymous>)\n at $V (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n at K_B (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2417:8747)\n at RM (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n at Tv (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n at Rv (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n at YS (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n at lM (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)","timestamp":"2025-07-23T22:32:38.125Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at hJ (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n at file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n at Array.map (<anonymous>)\n at $V (file:///C:/Users/frank/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n at K_B (file:///C:/Us
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗