Created: 2017 May 19th
Updated: 2021 January 4th
When you globally add a package with yarn and it doesn’t show in the terminal.
Usually adding the path to your .bashrc
or .zshrc
works, try
adding this:
If that doesn’t work you may need to set the yarn prefix.
Steps
Confirm your global bin path:
I got: /home/username/.yarn/bin
set yarn prefix:
make sure your yarn prefix is the parent directory of your bin directory. You can confirm by running
When I ran this it was undefined, so I set it:
Add the following to ~/.zshrc
or ~/.bashrc
Update all project dependencies to lates versions.
Couple of good one here from @beedesignllc
☝️ downloads and runs latest create-react-app
works for other
similarly named pkgs
☝️ will run node_modules/.bin/flow
without you having to add it as a
package.json script.
The equivalent to npm ci
for yarn: