New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn formula has no --without-node option #6946
Comments
Seeing this as well, looks like the Homebrew formula has been updated recently: Homebrew/homebrew-core@a34c721 |
I see, they decided to remove all options from But I don't think it was good decision in case of yarn, because it totally breaks compatibility with nvm (you have to force uninstall node after you install yarn). |
What's a good fallback? Installing via NPM for the time being? |
@ivancuric Installing yarn through brew and force removing node. Or using macports. |
Seeing this too, had to |
yeah, I installed from the previous version with: |
Ping @Daniel15 ? |
Hm actually not sure we can do much about it, right? 😕 |
Just hit this too. 😞 What's even worse is that it doesn't even throw an error or warning up, it just installs Node and keeps going. I flagged it on the yarnpkg/website side: yarnpkg/website#913 |
Weighing in to watch this issue. I went ahead and let it install node, and just making sure that NVM binaries are first in my path, per the recommendation in my commit comment here. |
Yeah I'm not sure if we can do anything here if it's a change in Homebrew itself. If you can't use Homebrew because of this, I'd recommend installing Yarn using the shell script. It's in the "alternatives" section in the installation instructions. |
Could we have two formulae? One that installs Yarn and Node (like what exists today), and one that installs Yarn without Node? Seems a bit messy though. Otherwise, I think we could have our own separate Homebrew repo for the Yarn formula, rather than including it in their core formulae. I don't know much about Homebrew, but I think you can do that using "taps". |
I think @Daniel15 's suggestion is on the right path. It seems from the discussion thread that the way forward for these use cases will be to setup a new Homebrew tap/formula. |
If someone wants to help us create a Homebrew "tap" to handle this, it would be great to add it to the releases repo: https://github.com/yarnpkg/releases The Homebrew team appear to be locking any conversations about this change, disallowing people from even talking about it in their repos and forum:
So I think we'll either need to create our own tap (help appreciated!), or update the site to list the installation shell script as preferred over Homebrew for people that use nvm. Yarn is the fifth most popular package on Homebrew (ref https://formulae.brew.sh/analytics/install-on-request/365d/) yet they didn't inform us of this change at all. |
Another data point: Around 16.7% of people that installed Yarn through Homebrew over the past year used the |
I got mine working by ignoring dependencies. This might bite me in the ass but everything is working as should be:
|
If an nvm/nodenv based node is ahead of homebrew's node in |
@rypit I think it'll pick it up for the purposes of (For good-ish reasons — the theory is that the install method should be guaranteed to work and easy to test on Homebrew's end, so now it just defaults to installing Node just in case.) |
The correct solution would be @rypit, Yarn picks up |
Homebrew formulae no longer support custom options so `--without-node` no longer works. `--ignore-dependencies` is now the recommended way to install yarn. yarnpkg/yarn#6946
Homebrew formulae no longer support custom options so `--without-node` no longer works. `--ignore-dependencies` is now the recommended way to install yarn. yarnpkg/yarn#6946
How do we upgrade yarn that has been installed without dependencies - without installing node as a dependency? |
I'd expect this might be a mismatch because of the older version and update not having this flag? Something to take up with the brew team, but I assume it would be removing the existing yarn and installing from scratch with the flag @PandaWood |
This problem seems to be a 'hot potato' tossed back and forth between yarn and homebrew. I have successfully bypassed the whole mess with:
|
The Yarn team can't change Homebrew's behaviour. You can use an alternate installation mechanism (like the installation script) if you'd like to avoid using Homebrew. |
I really don't get why npm install is not the recommended option |
Having installed previously without dependencies, this worked for me:
Works with |
I just brought another Macbook Pro up to date and I ran into this, after reading through the above and using I'm still unable to run yarn successfully. I have also tried a full uninstall of Homebrew, this does not fix the issue. When I run with the Warning: --ignore-dependencies is an unsupported Homebrew developer flag! |
there's no way to install via Homebrew without also installing Node. this is a limitation of Homebrew itself and can not be solved by us. Your options are:
https://yarnpkg.com/en/docs/install#alternatives-stable
This has already been done countless times, all linked throughout this thread |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
brew ignores the --without-node option and installs node
If the current behavior is a bug, please provide the steps to reproduce.
just install yarn with homebrew with --without-node option
What is the expected behavior?
nodejs should not be installed
Please mention your node.js, yarn and operating system version.
node 10.15.0, yarn 1.13.0, macos 10.14.2
The text was updated successfully, but these errors were encountered: