Skip to content

[BUG] claude code fails to upgrade automatically when installed with pnpm #12347

Description

@zakony-ai

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Everytime there is an upgrade to @anthropic-ai/claude-code I have an error showing that upgrade failed.
I spuspect it is because it is trying to upgrade using npm -g and I have it installed via pnpm -g

What Should Happen?

Automatic upgrade shouldn fail!

Error Messages/Logs

Steps to Reproduce

pnpm install -g @anthropic-ai/claude-code
claude
# wait for new version to see error 

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.53 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

terminal inside Zed

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagingautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions