pnpm: pnpm global update not working

pnpm version:

6.15.0

Code to reproduce the issue:

pnpm update --interactive --latest --global

Expected behavior:

To upgrade pnpm itself to the newer version (in this case, 6.15.1)

Actual behavior:

it shows the progress and “Already up-to-date” message.

Additional information:

  • node -v prints: v14.17.6
  • Windows, macOS, or Linux?: Linux ⬇️
System:
  Host: ZenBook Kernel: 5.4.0-84-generic x86_64 bits: 64
  Desktop: KDE Plasma 5.18.5 Distro: Ubuntu 20.04.3 LTS (Focal Fossa)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 6
  • Comments: 20 (6 by maintainers)

Commits related to this issue

Most upvoted comments

It worked for me, too, thanks @b0o

But I wonder if there will be a fix for this problem or a best practice.

I’m doing this as a workaround:

$ echo virtual-store-dir=.pnpm >> "$PNPM_HOME/global/5/.npmrc"
$ pnpm update --dir "$PNPM_HOME/global/5" --interactive --latest

You only need to run the first command once, then run the second command whenever you want to update your global packages.

Might be dangerous but it seems to work.

Yes, I could reproduce it.

This works though:

pnpm i --global vsce

It will install the latest vsce.

7.33.2 has the fix too

Well, you can use npm-check-updates with the pnpm flag

var=$(pnpm dlx npm-check-updates -gp pnpm | grep -i "pnpm -g add")
eval "$var"

I also noticed that when I update pnpm using brew, I lost all my global packages Seems related to this

cc @zkochan (I really appreciate your hard work on pnpm, tnx mate ❤️ )

Same here.

pnpm version:

6.24.2

Code to reproduce the issue:

pnpm up -igL

Expected behavior:

Update selected packages to the latest version.

Actual behavior:

Does nothing.

√ Choose which packages to update (Press <space> to select, <a> to toggle all, <i> to invert selection) · aws-cdk, pnpm
Already up-to-date
Progress: resolved 370, reused 369, downloaded 0, added 0, done

Debug information comes with --reporter ndjson. pnpm-debug.log

Additional information:

  • node -v prints: v14.18.1
  • Windows, macOS, or Linux?: Windows (Microsoft Windows [Version 10.0.19044.1415])