Skip to content
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

Brew install fails if corepack is install via brew #215

Closed
joshmeads opened this issue Feb 20, 2024 · 2 comments
Closed

Brew install fails if corepack is install via brew #215

joshmeads opened this issue Feb 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@joshmeads
Copy link

Describe the bug
If corepack is installed via brew (brew install corepack) the install will fail with the following:

==> Installing dashlane/tap/dashlane-cli dependency: yarn
Error: Cannot install yarn because conflicting formulae are installed.
  corepack: because both install `yarn` and `yarnpkg` binaries

Please `brew unlink corepack` before continuing.

Unlinking removes a formula's symlinks from /opt/homebrew. You can
link the formula again after the install finishes. You can `--force` this
install, but the build may fail or cause obscure side effects in the
resulting software.

To Reproduce
Steps to reproduce the behavior:

  1. brew install corepack
  2. brew install dashlane/tap/dashlane-cli
  3. See error

Expected behavior
dashlane cli installs

Environment (please complete the following information):

  • OS: MacOS 14.2.1
@joshmeads joshmeads added the bug Something isn't working label Feb 20, 2024
@Mikescops
Copy link
Member

Thanks for sharing this issue, I'll work on it when I have some time/

@Mikescops
Copy link
Member

I've looked around and this issue is not directly linked to our package.

We need yarn to build the CLI, but as specified in the code source of yarn.rb package, yarn is not compatible with corepack and hadoop because it's already shipped inside.

One of the solution I'm looking at is to allow a flag to be set if you have corepack installed.

Generic syntax example:

option 'with-Q', 'Depend on Q instead of P'

depends_on 'P' if !build.with?('Q')
depends_on 'Q' if  build.with?('Q')

So something like:

option 'with-corepack', 'Use yarn from corepack instead of installing it'

depends_on 'yarn' if !build.with?('corepack')
depends_on 'corepack' if  build.with?('corepack')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants