Permissions Error During Claude Code Global Package Update with NVM

Status Fixed / completed
Maintainer reply None cached
Activity 11 comments · opened Jul 3, 2025 · closed Jul 19, 2025

Bug Description
Got this error when I ran /status

⚠ No write permissions for auto-updates (requires sudo)
⚠ Config mismatch: running npm-global but config says unknown

Everything is working fine. I'm using nvm for running node and npm. I've enabled corepack as well. I'm not so sure what's causing the issue, but Claude Code should be able to just run npm install -g @anthropic-ai/claude-code@latest to update.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.41
  • Feedback ID: 3bfb877a-ddf6-4a1b-b65a-157993564a5b

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at JI (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n    at file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n    at Q (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at _X (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n    at w_ (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n    at U9 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-03T13:25:55.305Z"},{"error":"Error: Failed to check bun permissions\n    at QT5 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2121:690)\n    at async g9A (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2121:808)\n    at async ip (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2131:4230)\n    at async yP5 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2426:1118)\n    at async Y (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2426:4647)","timestamp":"2025-07-03T13:25:57.663Z"},{"error":"Error: Failed to check bun permissions\n    at QT5 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2121:690)\n    at async g9A (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2121:808)\n    at async ip (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2131:4230)\n    at async yP5 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2426:1118)\n    at async Y (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2426:4647)","timestamp":"2025-07-03T13:26:00.107Z"},{"error":"Error: Failed to check bun permissions\n    at QT5 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2121:690)\n    at async g9A (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2121:808)\n    at async ip (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2131:4230)\n    at async yP5 (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2426:1118)\n    at async Y (file:///Users/phuctm97/.nvm/versions/node/v22.15.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2426:4647)","timestamp":"2025-07-03T13:26:00.117Z"}]

View original on GitHub ↗

11 Comments

chicken-suop · 1 year ago

I'm getting a similar issue.

When I run /status:

 Claude Code Status v1.0.45

  L Session ID: a1731eb0-0218-4cd5-8479-4241e5826a45

 Working Directory 
  L /home/user/foo

 Installation Health • /doctor
 ⚠  Config mismatch: running unknown but config says global

 IDE Integration • /config
 ✔  Connected to VS Code extension
 ✔  Installed VS Code extension

 Account • /login
  L Login Method: Claude Max Account
  L Organization: email@example.com's Organization
  L Email:  email@example.com

 Memory • /memory
  L project: CLAUDE.md

 Model • /model
  L opus (claude-opus-4-20250514)

When I run /doctor:

 Claude CLI Diagnostic
 Currently running: unknown (1.0.45)
 Path: /usr/bin/node
 Invoked: /home/user/.bun/bin/claude
 Auto-updates: No
 Config install method: global
 Config auto-updates: true

My settings file is at /home/user/.claude/settings.local.json

Reyrey14-1 · 1 year ago
zanhk · 1 year ago

Thanks, how can we upgrade claude code now? do we need to repeat the entire process?

Edit: probably claude update should do the job https://docs.anthropic.com/en/docs/claude-code/setup#update-claude-code

kareem-hussien · 1 year ago
claude update

for me the update is auto and still working fine.

phuctm97 · 1 year ago
nhangen · 1 year ago

What if you don't want to migrate to a local installation? That solution is insufficient.

leesh5000 · 1 year ago
Thanks, how can we upgrade claude code now? do we need to repeat the entire process? Edit: probably claude update should do the job https://docs.anthropic.com/en/docs/claude-code/setup#update-claude-code

it works me. thanks you

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.