claude-code - 💡(How to fix) Fix [BUG] claude doctor to work with nvm [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53265Fetched 2026-04-26 05:20:08
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

Error Messages/Logs

Root Cause

  • Claude Code version: 2.1.119
    • Install method: npm via nvm (/c/nvm4w/nodejs/node_modules/@anthropic-ai/claude-code/)
    • OS: Windows 11 Pro (arm64)
    • Repro: claude doctor → exit code 139 (segfault)
    • Root cause: C:\Program Files\ClaudeCode\ does not exist (npm install, not standalone installer)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

  • Claude Code version: 2.1.119
  • Install method: npm via nvm (/c/nvm4w/nodejs/node_modules/@anthropic-ai/claude-code/)
  • OS: Windows 11 Pro (arm64)
  • Repro: claude doctor → exit code 139 (segfault)
  • Root cause: C:\Program Files\ClaudeCode\ does not exist (npm install, not standalone installer)

What Should Happen?

claude cli crashed from time to time and exit to DOS command.

Error Messages/Logs

Steps to Reproduce

  1. claude
  2. /context
  3. crashed

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

  1. claude doctor assumes Claude Code was installed via the standalone Windows installer and hardcodes C:\Program Files\ClaudeCode\ as the expected path
  2. When installed via npm/nvm, that directory doesn't exist
  3. Instead of detecting this and printing something like "not installed via standalone installer, skipping auto-updater check", it segfaults

That's a clear bug — a missing directory should never cause a crash. It should be handled gracefully.

You can report it at https://github.com/anthropics/claude-code/issues with these details:

  • Claude Code version: 2.1.119
  • Install method: npm via nvm (/c/nvm4w/nodejs/node_modules/@anthropic-ai/claude-code/)
  • OS: Windows 11 Pro (arm64)
  • Repro: claude doctor → exit code 139 (segfault)
  • Root cause: C:\Program Files\ClaudeCode\ does not exist (npm install, not standalone installer)

※ recap: We diagnosed errors in Claude Code's debug logs. The one open action is filing a bug report at github.com/anthropics/claude-code/issues for the claude doctor segfault when Claude Code is installed via nvm. (disable recaps in /config)

extent analysis

TL;DR

The most likely fix is to modify the claude doctor command to handle the case where Claude Code is installed via npm/nvm and the expected directory C:\Program Files\ClaudeCode\ does not exist.

Guidance

  • Verify that the issue is indeed caused by the missing directory by checking the installation method and the presence of the C:\Program Files\ClaudeCode\ directory.
  • Consider modifying the claude doctor command to detect the installation method and print a warning message instead of crashing when the directory is not found.
  • Check the Claude Code documentation to see if there are any known workarounds or fixes for this issue.
  • File a bug report at https://github.com/anthropics/claude-code/issues with the provided details to request a fix.

Example

No code snippet is provided as the issue does not contain sufficient information to create a concrete example.

Notes

The issue seems to be specific to the Windows platform and the installation method via npm/nvm. The fix may not be applicable to other platforms or installation methods.

Recommendation

Apply workaround: Modify the claude doctor command to handle the case where Claude Code is installed via npm/nvm and the expected directory C:\Program Files\ClaudeCode\ does not exist, as this is a known bug that causes a segfault.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] claude doctor to work with nvm [1 participants]