The last Yarn version in Homebrew uses a non-LTS version (
15) of NodeJS as its dependency. If this is an issue for you as it is for me, I just managed to accomplish use Yarn with the latest LTS version of NodeJS.
I created a gist for it and here are the following steps
- Uninstall Yarn and Node
$ brew uninstall yarn $ brew uninstall node
- Install the latest LTS version of Node
$ brew install node@12
- Create the Symlink for it
$ ln -s /usr/local/opt/node@12 /usr/local/opt/node
- Install Yarn without its dependencies
$ brew install yarn --ignore-dependencies
And that’s it!
If you want to check the versions of each package, just run
echo "Yarn Version: $(yarn --version)" echo "Node Version: $(node --version)"