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

Should probably run corepack to avoid installing package manager globally #194

Open
5 tasks done
eramdam opened this issue Dec 6, 2023 · 1 comment
Open
5 tasks done

Comments

@eramdam
Copy link

eramdam commented Dec 6, 2023

Describe the bug

I recently ran across a repo that uses a recent version of Yarn (https://github.com/mastodon/mastodon/ which recently switched to Yarn 4.x) and I had yarn 1.x installed globally so ni thought it was the right version to run.

Even though un-installing my global (1.x) version of yarn "fixed" the issue, Yarn's documentation states that modern releases aren't meant to be installed globally so I feel like running corepack enable would be a better fix.

Reproduction

clone https://github.com/mastodon/mastodon/, run ni with yarn 1.x installed globally

System Info

System:
    OS: macOS 14.1.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 676.20 MB / 32.00 GB
    Shell: 3.6.4 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.9.0 - ~/Library/Caches/fnm_multishells/16589_1701886436951/bin/node
    npm: 10.2.1 - ~/Library/Caches/fnm_multishells/16589_1701886436951/bin/npm
  Browsers:
    Chrome: 119.0.6045.199
    Safari: 17.1.2

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@HawtinZeng
Copy link
Contributor

@antfu How about we integrate the corepack command into ni, corepack is a package manager version manager, it support npm, yarn, pnpm, as this blog says

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants