Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 786 Bytes

ensure-shell-can-find-global-npm-binaries.md

File metadata and controls

30 lines (21 loc) · 786 Bytes

Ensure Shell Can Find Global npm Binaries

When you install a package globablly either with yarn (or npm)

$ yarn global add vercel

It places the binaries for that package in the bin directory of your package manager's configured path prefix.

The absolute path to this bin directory can be found with:

$ yarn global bin
/Users/jbranchaud/.asdf/installs/nodejs/15.4.0/.npm/bin

You can ensure that everything located in that bin directory is on your shell's path by adding the following line to your shell's config file (e.g. .bashrc or .zshrc).

export PATH="$PATH:$(yarn global bin)"

Once you've updated your shell config, make sure you source the file or restart your shell.

source