DEV Community

Cover image for Yarn global package install location
Julian
Julian

Posted on

Yarn global package install location

Commands

Install a package globally

yarn global add ladon
npm install -g ladon
Enter fullscreen mode Exit fullscreen mode

update a package

npm update ladon --global
yarn global upgrade ladon
Enter fullscreen mode Exit fullscreen mode

Yarn global install locations

  • Windows %LOCALAPPDATA%\Yarn\config\global for example: C:\Users\username\AppData\Local\Yarn\config\global
  • OSX and non-root Linux ~/.config/yarn/global
  • Linux if logged in as root /usr/local/share/.config/yarn/global

also don't forget to add the yarn bin folder to your path:

for example:

C:\Users\username\AppData\Local\Yarn\bin
Enter fullscreen mode Exit fullscreen mode

Links

Top comments (4)

Collapse
 
shadow profile image
Andreas Opferkuch • Edited

Note that you can use yarn global bin to output the path to that bin folder just in case you can't find it. :)

Collapse
 
hunam6 profile image
Hunam

I think the path for Windows moved, it's %LOCALAPPDATA%\Yarn\bin now

Collapse
 
wirths profile image
Harald T. Wirths

And yarn global dir provides you with the directory, in which node packges reside.

Collapse
 
yadro profile image
Yadro

%LOCALAPPDATA%\Yarn\bin is empty. Where can I find binaries to use it in WebStorm?