Yarn: Brew Formula not found

Created on 6 Jan 2017  路  8Comments  路  Source: yarnpkg/yarn

brew install yarn reports "Error: No available formula with the name "yarn"`

I'm guessing this is related to the 0.17.10 vs 0.18.0 switch I see mentioned when I search for yarn, but am unsure if this is just me seeing this.

OS X 10.12, Brew 0.9.9

2017-01-05 at 4 46 pm

Most helpful comment

Fixed, here's how:

cd /usr/local/Library/Formula
ls | grep yarn

hey look... no yarn.rb there... let's manually create it.

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/yarn.rb

now let's try again

brew install yarn

Woo hoo it installed v0.18.1!

So I don't know why brew update wasn't getting that, again I'm guessing because of the 0.17.10 revert... but whatever... working.

All 8 comments

Yeah, odd, the formula is there https://github.com/Homebrew/homebrew-core/blob/master/Formula/yarn.rb.
Could that be a brew issue?

Could be... I really have no idea what would cause this or even where to start. However,

brew install node for example works (as do all the others I tested uninstalled/reinstalled). It's just yarn that isn't found.

Fixed, here's how:

cd /usr/local/Library/Formula
ls | grep yarn

hey look... no yarn.rb there... let's manually create it.

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/yarn.rb

now let's try again

brew install yarn

Woo hoo it installed v0.18.1!

So I don't know why brew update wasn't getting that, again I'm guessing because of the 0.17.10 revert... but whatever... working.

Still experiencing this issue today. Above fix worked

Tried the above and got this:

Error: undefined method `rebuild' for #<BottleSpecification:0x007ff009881d68>
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/yarn.rb:12:in `block in <class:Yarn>'
/usr/local/Library/Homebrew/software_spec.rb:92:in `instance_eval'
/usr/local/Library/Homebrew/software_spec.rb:92:in `bottle'
/usr/local/Library/Homebrew/formula.rb:1788:in `bottle'
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/yarn.rb:10:in `<class:Yarn>'
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/yarn.rb:3:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:25:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:25:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:42:in `load_formula_from_path'
/usr/local/Library/Homebrew/formulary.rb:91:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:78:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:215:in `factory'
/usr/local/Library/Homebrew/formulary.rb:374:in `find_with_priority'
/usr/local/Library/Homebrew/extend/ARGV.rb:20:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:102:in `install'
/usr/local/Library/Homebrew/brew.rb:87:in `<main>'

Had to forcibly update brew per this discussion:

http://discourse.brew.sh/t/how-to-upgrade-brew-stuck-on-0-9-9/33/16

Like @Jamiewarb said Still experiencing this issue today. Above fix worked Homebrew 0.9.9

THX! jb510

You can always uninstall/reinstall brew. I had to do that on an old laptop of mine that I was using during work travel.

Was this page helpful?
0 / 5 - 0 ratings