Permissions Error During Claude Code Global Package Update with NVM
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"}]
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 protected]'s Organization
L Email: [email protected]
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
https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation
this worked for me
https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation
this worked for me
worked for me 👍
https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation this worked for me
worked for me 👍
same here! thanks!
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
https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation
this worked for me
This is very helpful! Thanks
claude update
for me the update is auto and still working fine.
This works for me as well: https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation
I think we should close this issue.
What if you don't want to migrate to a local installation? That solution is insufficient.
Thanks, how can we upgrade claude code now? do we need to repeat the entire process?
Edit: probably
claude updateshould do the job https://docs.anthropic.com/en/docs/claude-code/setup#update-claude-code
it works me. thanks you
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.