Skip to content

Add support for auto-updates via pnpm #141

Closed as duplicate
Closed as duplicate

Description

@gerrywastaken

Bug Description
I use Fish shell. Every time I start Claude it says "Update installed · Restart to apply", however, that doesn't do anything. I'm guessing it requires me to load bash or something, however, that never loads on my system.

Environment Info

  • Platform: linux (Ubuntu)
  • Terminal: undefined (I don't know why it says undefined, it is Gnome Terminal)
  • Version: 0.2.8
  • Feedback ID: 77e67842-67e0-4b44-8f5e-4fda685e049f

Activity

  1. gerrywastaken commented on Feb 26, 2025

    @gerrywastaken
    Author

    SOLUTION


    For others ending up here. You can manually fix the version installed by running the install again.

    npm uninstall -g @anthropic-ai/claude-code
    

    I think the issue in my case is that my system uses pnpm (the more efficient npm that doesn't use up all your disk space) and I'm guessing that Anthropic didn't test with that. I'll leave this open for now because as more users switch this issue will happen for many of them.

    For me I did this:

    npm uninstall -g @anthropic-ai/claude-code
    pnpm install -g @anthropic-ai/claude-code
    

    You need to do this for every update, but at least next time this comment will exist when people Google the issue... or perhaps Anthropic will support pnpm.

  2. changed the title [-]Shell Compatibility Issue with Claude in Fish Shell Environment[/-] [+]Shell Compatibility Issue with Claude in Fish Shell Environment (edit: this was actually incompatibility with systems using pnpm)[/+] on Feb 26, 2025
  3. added
    enhancement
    on Feb 26, 2025
  4. changed the title [-]Shell Compatibility Issue with Claude in Fish Shell Environment (edit: this was actually incompatibility with systems using pnpm)[/-] [+]Add support for auto-updates vi pnpm[/+] on Feb 26, 2025
  5. changed the title [-]Add support for auto-updates vi pnpm[/-] [+]Add support for auto-updates via pnpm[/+] on Feb 26, 2025
  6. mgandolfi7 commented on Apr 30, 2025

    @mgandolfi7

    I only ran into this issue while running claude update in a directory with a packageManager locked to pnpm. If I cd outside of that directory it does not throw an error. Mac M2 15.3.1. Clade Code 0.2.92.

  7. gerrywastaken commented on Jul 31, 2025

    @gerrywastaken
    Author

    @bcherny Just as an update. This was marked as a duplicate of #80; however, I think that issue ultimately only addressed the brew install issue. The 9 upvotes on my workaround above also suggest I'm not the only one hitting this upgrade problem every time Claude Code has a point release.

    Image

    The workaround is not a huge issue, just more of a minor annoyance, but perhaps this issue should be reopened? It now seems like there are a lot more people running pnpm

    Image

    Search: Currently 47 Github Issues that contain the keyword "pnpm". Most are not related to this problem, but are more an indication of the use of pnpm among ClaudeCode users.

    Here is an example of what happens when I manually run claude update instead of my workaround above:

    > claude update
    Current version: 1.0.60
    Checking for updates...
    
    Warning: Configuration mismatch
    Config expects: global installation
    Currently running: unknown
    Updating the unknown installation you are currently using
    Config updated to reflect current installation method: unknown
    New version available: 1.0.64 (current: 1.0.60)
    Installing update...
    Warning: Could not determine installation type
    Attempting global update based on file detection...
    Using global installation update method...
    Error: Insufficient permissions to install update
    Try running with sudo or fix npm permissions
    Or consider migrating to a local installation with:
      claude migrate-installer
    

    Detection of pnpm install should discoverable via the path which contains /pnmp/:

    > claude doctor
    
     Claude CLI Diagnostic
     Currently running: unknown (1.0.60)
     Path: /home/gerry/.local/share/pnpm/nodejs/22.16.0/bin/node
     Invoked: /home/gerry/.local/share/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.60/no
     de_modules/@anthropic-ai/claude-code/cli.js
     Config install method: global
     Auto-updates enabled: true
     Press Enter to continue…
    
  8. wolffiex commented on Jul 31, 2025

    @wolffiex
    Collaborator

    We are switching to native installs, which sidesteps questions about package manager (or JS runtime for that matter.) If you have a working claude, try claude install

    More here: https://docs.anthropic.com/en/docs/claude-code/setup#native-binary-installation-alpha
    We'll be switching this to be in beta today.

  9. gerrywastaken commented on Jul 31, 2025

    @gerrywastaken
    Author

    Ah I see, thanks for the update Adam. If only I'd waited a day :D

  10. gerrywastaken commented on Jul 31, 2025

    @gerrywastaken
    Author

    @wolffiex just a quick note.
    I noticed something in the new installer:

    https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/bootstrap.sh

    # Always download stable version (which has the most up-to-date installer)
    version=$(curl -fsSL "$GCS_BUCKET/stable")
    
    # Download manifest and extract checksum
    manifest_json=$(curl -fsSL "$GCS_BUCKET/$version/manifest.json")
    
    [...]
    
    curl -fsSL -o "$binary_path" "$GCS_BUCKET/$version/$platform/claude"
    

    Currently, if somebody were able to compromise the bucket, they would likely be able to compromise both the binary and the manifest, making the check less useful. You could store the manifest in this GitHub repo or sign the manifest to improve things. Currently, the manifest only helps as an integrity measure, but doesn't really make things more secure... if that was the intent.

  11. wolffiex commented on Jul 31, 2025

    @wolffiex
    Collaborator

    Thanks for this feedback! For now it's intended as a integrity check and not a security measure. The binary is signed on Mac and Windows but we could do better on Linux.

  12. github-actions commented on Aug 8, 2025

    @github-actions

    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.

  13. locked as resolved and limited conversation to collaborators on Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions