Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm global update not working #3779

Closed
MoKhajavi75 opened this issue Sep 17, 2021 · 20 comments · Fixed by #6671
Closed

pnpm global update not working #3779

MoKhajavi75 opened this issue Sep 17, 2021 · 20 comments · Fixed by #6671

Comments

@MoKhajavi75
Copy link

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)
@silver886
Copy link

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])

@tjx666
Copy link

tjx666 commented Feb 19, 2022

Same here.

image

@zkochan
Copy link
Member

zkochan commented Feb 19, 2022

Try with pnpm v7

@tjx666
Copy link

tjx666 commented Apr 29, 2022

Try with pnpm v7

Still not woring in latest version 7.0.0-rc.9

image

Latest vsce version is 2.7.0

@zkochan

@zkochan
Copy link
Member

zkochan commented May 1, 2022

Yes, I could reproduce it.

This works though:

pnpm i --global vsce

It will install the latest vsce.

@vemoo
Copy link

vemoo commented May 11, 2022

I think this is the same as #3720
I wrote the results of some investigations there: #3720 (comment), but I don't know if they are still relevant on pnpm v7.

@b0o
Copy link

b0o commented Aug 8, 2022

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.

@exsesx
Copy link

exsesx commented Aug 11, 2022

It worked for me, too, thanks @b0o

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

@tjx666
Copy link

tjx666 commented Sep 16, 2022

@zkochan any update on this? I think this is an serious issue.

@aydgn
Copy link

aydgn commented Sep 30, 2022

I use @b0o's way but it should be fixed ASAP.

@MoKhajavi75
Copy link
Author

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 ❤️ )

@ekwoka
Copy link
Contributor

ekwoka commented Feb 6, 2023

Yeah, doesn't work. Outdated sees it's outdated, but update just says it's all up to date, even with latest flag

@exsesx
Copy link

exsesx commented Mar 21, 2023

Any updates?

@ekwoka
Copy link
Contributor

ekwoka commented Mar 21, 2023

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"

@lawrencejob
Copy link

I'm so glad it's not just me. I was pouring over the documentation trying to figure out what I wasn't understanding.

@kytta
Copy link

kytta commented Jun 13, 2023

This is the same for me. pnpm up -giL as well as pnpm up -gL do so as if they're doing work: They seem to resolve the deps, and they even download something, but this never results in an upgrade. pnpm up -g works, but not for major updates; for this, I have to kinda re-install the package (as described in #3779 (comment)).

@ekwoka
Copy link
Contributor

ekwoka commented Jun 14, 2023

@kytta

npm-check-updates works with pnpm and global packages. Even lets you preview and interactively select the updates.

@iamchathu
Copy link

This is seems same with version 8. What is the fix for this?

@vemoo
Copy link

vemoo commented Jun 24, 2023

This has been fixed on v8.6.3, I'm not sure it has been fixed on v7

@zkochan
Copy link
Member

zkochan commented Jun 24, 2023

7.33.2 has the fix too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.