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

How to reinstall global packages (e.g. after Node version change)? #5551

Open
OliverJAsh opened this issue Mar 20, 2018 · 1 comment
Open
Assignees
Labels

Comments

@OliverJAsh
Copy link

OliverJAsh commented Mar 20, 2018

Do you want to request a feature or report a bug?

Possibly a feature request

What is the current behavior?
After changing Node version, I want to reinstall all my globally installed Yarn packages.

To do this, currently I have to reinstall each package by running yarn global remove and then yarn global add.

Ideally, there would be a command to do this for me, for all currently/previously installed global packages, i.e. those specified in ~/.config/yarn/global/package.json.

Perhaps we could use a yarn global install command to do this? Or is there another, pre-existing solution to this problem? I tried searching to no avail.

Note that nvm handles reinstalling global Node modules when installing a new version of Node: https://github.com/creationix/nvm#migrating-global-packages-while-installing. However, this doesn't seem to play well with global Node modules installed via Yarn: nvm-sh/nvm#1601 and nvm-sh/nvm#1601 (comment).

@ghost ghost assigned kaylie-alexa Mar 20, 2018
@ghost ghost added the triaged label Mar 20, 2018
@alexreg
Copy link

alexreg commented Feb 23, 2019

Any update on this yet? I don't know of any solution that exists for reinstalling all global NPM packages, which is quite annoying.

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

No branches or pull requests

3 participants