How can I list all globally installed npm packages using yarn?

How do I list all globally installed npm packages with yarn?

I am new to yarn and list all the npm packages installed all over the world, I use the npm -g -depth = 0 list, but is there any yarn equivalent?

+5
source share
2 answers

TL DR: yarn global ls

Longer answer: Use yarn global for any global related task. Consider the yarn global command as a whole, and not in terms of yarn + the global suffix, as with npm + -g .

list does not work with yarn global (although it works with yarn locally). Use the short version of ls instead. yarn global has no concept of depth (although --depth=0 works for yarn locally).

More on yarn global : https://yarnpkg.com/en/docs/cli/global

+4
source

Now we have to use yarn global list , since version 1.0.0 of yarn global ls deprecated.

v1.0.0! πŸŽ‰

+4
source

Source: https://habr.com/ru/post/1262975/


All Articles