claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Permissions Error During Claude Code Global Package Update with NVM

Open phuctm97 opened this issue 1 year ago • 11 comments

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"}]

phuctm97 avatar Jul 03 '25 13:07 phuctm97

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

chicken-suop avatar Jul 10 '25 00:07 chicken-suop

https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation

this worked for me

alexander-densley avatar Jul 14 '25 19:07 alexander-densley

https://docs.anthropic.com/en/docs/claude-code/troubleshooting#recommended-solution%3A-migrate-to-local-installation

this worked for me

worked for me 👍

kareem-hussien avatar Jul 17 '25 04:07 kareem-hussien

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!

Reyrey14-1 avatar Jul 17 '25 05:07 Reyrey14-1

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

zanhk avatar Jul 17 '25 10:07 zanhk

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

snowsuika avatar Jul 18 '25 03:07 snowsuika

claude update

for me the update is auto and still working fine.

kareem-hussien avatar Jul 18 '25 17:07 kareem-hussien

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.

phuctm97 avatar Jul 19 '25 02:07 phuctm97

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

nhangen avatar Jul 27 '25 15:07 nhangen

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

leesh5000 avatar Jul 30 '25 11:07 leesh5000

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.

github-actions[bot] avatar Aug 06 '25 14:08 github-actions[bot]