Broken "brew install yarn"?


If you install yarn with brew and it breaks you might need to crack into your zshrc file from your terminal : nano ~/.zshrc

The Error looks like this:

It tells you to echo add pathnames But instead at the bottom paste in these paths:

export PATH="/usr/local/opt/openssl/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

export PATH="/usr/local/opt/sqlite/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/sqlite/include"

export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

export PATH="/usr/local/opt/icu4c/bin:$PATH"
export PATH="/usr/local/opt/icu4c/sbin:$PATH"
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"

export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

Is there a better way out there?


Installing yarn through npm has always yielded better results for me, and is cross-platform

npm install yarn --global


sudo npm install yarn --global