[BUG] Can't figure out how to fix permission issues on Mac
Resolved 💬 4 comments Opened Mar 11, 2025 by ndbroadbent Closed Sep 10, 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.2
- Terminal: iTerm2
Bug Description
I've followed the instructions a few times: https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#recommended-create-a-new-user-writable-npm-prefix
But I can't get claude doctor to stop showing a permissions warning:
Enable automatic updates?
Claude Code can't update itself because it doesn't have sufficient permissions.
Please visit our troubleshooting guide...
And the warnings show inside claude code as well.
Here's what I'm running:
$ mkdir -p ~/.npm-global
$ npm config set prefix ~/.npm-global
$ npm install -g @anthropic-ai/claude-code
added 3 packages in 409ms
2 packages are looking for funding
run `npm fund` for details
Reshimming mise lts...
$ which claude
/Users/ndbroadbent/.npm-global/bin/claude
$ claude doctor
Enable automatic updates?
Claude Code can't update itself because it doesn't have sufficient permissions.
...
$ ls -l /Users/ndbroadbent/.npm-global/bin/claude
lrwxr-xr-x 1 ndbroadbent staff 52 Mar 12 10:28 /Users/ndbroadbent/.npm-global/bin/claude -> ../lib/node_modules/@anthropic-ai/claude-code/cli.js
$ ls -l /Users/ndbroadbent/.npm-global
total 0
drwxr-xr-x 3 ndbroadbent staff 96 Mar 12 10:28 bin
drwxr-xr-x 3 ndbroadbent staff 96 Mar 12 10:28 lib
$ which mise
/Users/ndbroadbent/.local/bin/mise
$ which npm
/Users/ndbroadbent/.local/share/mise/shims/npm
Note that it does work when I run sudo claude doctor:
sudo claude doctor
Password:
✓ npm permissions: OK
Your installation is healthy and ready for auto-updates.
Press Enter to continue…
$ ls -la ~/.claude.json
-rw-r--r--@ 1 ndbroadbent staff 77516 Mar 12 10:36 /Users/ndbroadbent/.claude.json
$ ls -la ~/.claude/
total 0
drwxr-xr-x@ 3 ndbroadbent staff 96 Mar 12 10:19 .
drwxr-x---+ 133 ndbroadbent staff 4256 Mar 12 10:29 ..
drwxr-xr-x@ 4 ndbroadbent staff 128 Mar 12 10:36 statsig
$ ls -la ~/.claude/statsig/
total 16
drwxr-xr-x@ 4 ndbroadbent staff 128 Mar 12 10:36 .
drwxr-xr-x@ 3 ndbroadbent staff 96 Mar 12 10:19 ..
-rw-r--r--@ 1 ndbroadbent staff 105 Mar 12 10:36 statsig.session_id.2656274335
-rw-r--r--@ 1 ndbroadbent staff 38 Mar 4 15:18 statsig.stable_id.2656274335
What permissions is it checking?
Steps to Reproduce
Not sure how to reproduce on other machines.
Expected Behavior
No permissions error. I'm running claude as my user, it has all the needed permissions.
Actual Behavior
Getting a permissions error
Additional Context
I'm using mise to manage my node and npm versions: https://github.com/jdx/mise
Could this be causing the issue?
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗