Nvm: feature suggestion: ability to reinstall from yarn globals

Created on 31 Aug 2017  Â·  7Comments  Â·  Source: nvm-sh/nvm

feature requests

Most helpful comment

The default for yarn is irrelevant; only “what npm does” is the standard. Where yarn deviates, yarn is broken.

All 7 comments

yarn globals are installed in the same place npm globals are; npm ls -g --depth=0 should list them just fine.

Separately, no, I'm not going to add any special support for something that doesn't ship with node.

Why not reinstall the yarn globals... WITH YARN?!

When I ran nvm install node --reinstall-packages-from=node and saw my globals didn't get reinstalled.

@ljharb

yarn globals are installed in the same place npm globals are; npm ls -g --depth=0 should list them just fine.

Is this true? My yarn globals are installed to ~/.config/yarn/global/node_modules/.

npm ls -g --depth=0 does not list them.

Are you using yarn-specific config to override the install location? In that case, you’ve broken established npm conventions (and presumably had to modify your PATH to do it), and nvm won’t be able to work with that.

@ljharb I don't believe so, that's the default location according to:

yarn global dir will print the output of the global installation folder that houses the global node_modules. By default that will be: ~/.config/yarn/global.

— https://yarnpkg.com/lang/en/docs/cli/global/

The default for yarn is irrelevant; only “what npm does” is the standard. Where yarn deviates, yarn is broken.

@niftylettuce @OliverJAsh it's pnpm time!

Was this page helpful?
0 / 5 - 0 ratings