[BUG] claude doctor reports insufficient permissions for automatic updates when using NVM

Resolved 💬 12 comments Opened Mar 12, 2025 by benjamincburns Closed Aug 6, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 0.2.37
  • Operating System: macOS 15.3.1
  • Terminal: iTerm2

Bug Description

I use NVM on mac. NVM sets up my global prefix as a directory that my user owns, under my home DIR:

$ npm prefix -g
/Users/bburns/.nvm/versions/node/v22.13.1
$ ls -al $(npm prefix -g)
total 1248
drwxr-xr-x@  9 bburns  staff     288 Jan 29 17:41 .
drwxr-xr-x@  7 bburns  staff     224 Feb 21 13:04 ..
-rw-r--r--@  1 bburns  staff  454231 Jan 21 14:38 CHANGELOG.md
-rw-r--r--@  1 bburns  staff  140397 Jan 21 14:38 LICENSE
-rw-r--r--@  1 bburns  staff   39769 Jan 21 14:38 README.md
drwxr-xr-x@ 18 bburns  staff     576 Mar 12 18:51 bin
drwxr-xr-x@  3 bburns  staff      96 Jan 21 14:38 include
drwxr-xr-x@  3 bburns  staff      96 Jan 21 14:38 lib
drwxr-xr-x@  4 bburns  staff     128 Jan 21 14:38 share

This is a standard NVM setup on mac, designed to avoid the user having to use sudo when doing global installs.

In spite of this, running claude doctor reports Claude Code can't update itself because it doesn't have sufficient permissions.

Steps to Reproduce

  1. Set up node using NVM
  2. Run npm install -g @anthropic-ai/claude-code
  3. Run claude doctor

Expected Behavior

It wouldn't complain about update permissions.

Actual Behavior

It complains about update permissions.

Additional Context

<img width="1728" alt="Image" src="https://github.com/user-attachments/assets/5b19aed9-f522-4adb-a58a-33d432da19c1" />

View original on GitHub ↗

This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗