yarn icon indicating copy to clipboard operation
yarn copied to clipboard

"yarn global list" doesn't list globally installed packages that don't have binaries

Open garyking opened this issue 6 years ago • 8 comments

When running yarn global list, it doesn't list globally installed packages that don't have binaries installed, such as eslint-config-airbnb-base.

garyking avatar Apr 25 '18 01:04 garyking

Hi @garyking ! Thanks for filing an issue - would you mind following the issue template so we have steps to reproduce?

kaylie-alexa avatar Apr 26 '18 17:04 kaylie-alexa

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

Bug

What is the current behavior? When I run yarn global list, packages like eslint-config-airbnb-base don't appear. Perhaps because it doesn't have any binaries associated with it?

If the current behavior is a bug, please provide the steps to reproduce.

Run yarn global list to show all globally installed packages.

What is the expected behavior? eslint-config-airbnb-base and all other globally installed packages should appear.

Please mention your node.js, yarn and operating system version. Yarn 1.6.0. Mac OS X 10.13.3.

garyking avatar Apr 26 '18 17:04 garyking

Is there a workaround for this?

EDIT: Running cat `yarn global dir`/package.json should list globally-installed dependencies regardless of whether they have binaries or not.

lostfictions avatar Jul 21 '18 22:07 lostfictions

When I run yarn list I do get a list of the packages I have installed globally...

info "[email protected]" has binaries:   - create-next-app
info "[email protected]" has binaries:
   - create-react-app
info "[email protected]" has binaries:
   - eslint
info "[email protected]" has binaries:
   - flow-typed
info "[email protected]" has binaries:
   - gatsby
info "[email protected]" has binaries:
   - gulp
info "[email protected]" has binaries:
   - jspm
info "[email protected]" has binaries:
   - karma
info "[email protected]" has binaries:
   - prettier
✨  Done in 2.52s.

Running

yarn Mac OS High Sierra node
1.9.4 10.13.6 v10.9.0

code4cake avatar Sep 22 '18 17:09 code4cake

I second this: Having only global packages with binaries in yarn global list is quite annoying. Any update on this?

jpschober avatar Jan 18 '19 22:01 jpschober

Same here, yarn global list lists only packages that have binaries

thoussem avatar Jan 23 '19 09:01 thoussem

bug?

npm list -g can't find react-native-cli , but open /usr/local/lib/node_modules can see react-native-cli

https://stackoverflow.com/a/54034877/5934465

image

image

xgqfrms avatar Jun 30 '20 11:06 xgqfrms

yarn --cwd `yarn global dir` list

as workaround

d1sparity-plesk avatar Jul 24 '22 16:07 d1sparity-plesk