How do I list all globally installed npm packages using yarn?
I am new to yarn and to list all npm packages installed globally, I use npm list -g --depth=0 but is there a yarn equivalent?
EDIT
yarn global ls is now deprecated. It has been replaced with yarn global list instead.
TL;DR: yarn global ls
Longer answer:
Use yarn global for any global related task. Consider yarn global a command as a whole, and not in terms of yarn + the suffix global as with npm + -g.
list does not work with yarn global (though it works with yarn at the local level). Use the short version ls instead. yarn global has no concept of depth either (though --depth=0 work for yarn at the local level).
For more details on yarn global: https://yarnpkg.com/en/docs/cli/global
We should now use yarn global list since version 1.0.0 yarn global ls is deprecated.
v1.0.0 ! 🎉
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With