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

corepack not available on macOS 15 #10905

Closed
3 of 15 tasks
daveisfera opened this issue Nov 5, 2024 · 6 comments
Closed
3 of 15 tasks

corepack not available on macOS 15 #10905

daveisfera opened this issue Nov 5, 2024 · 6 comments

Comments

@daveisfera
Copy link

daveisfera commented Nov 5, 2024

Description

With macOS 14 and previous, you can run corepack enable to use yarn as the package manager, but this doesn't work with macOS 15

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image: macos-15-arm64
Version: 20241022.250

Is it regression?

Yes (worked with macOS 14)

Expected behavior

Ability to use yarn as the package manager is maintained

Actual behavior

Run corepack enable
/Users/runner/work/_temp/aeab8a80-fdd5-[4](https://github.com/awresports/awresports-app/actions/runs/11678040481/job/32516898250#step:4:5)d0f-b29d-003c16bb6745.sh: line 1: corepack: command not found
Error: Process completed with exit code 127.

Repro steps

  1. Run corepack enable
  2. Observe failure
  3. Try to use yarn without and also fails
@susmitamane
Copy link
Contributor

Hi @daveisfera We will look into the issue and keep you posted with updates.

@daveisfera
Copy link
Author

Thanks for the update! I changed it to be a Regression in the initial report, because it's either a regression or a breaking change and either way it should be fixed

@aartis17
Copy link
Contributor

Hi @daveisfera,
To enable corepack, you need to install it using Homebrew. In your workflow file, use the command brew install corepack to install corepack, and then run corepack enable to activate it.

Please see workflow file which I used:

name: Enable Corepack and Use Yarn

on:
  workflow_dispatch:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [ 'macos-15']
    runs-on: ${{ matrix.os }}

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
      
    - name: install Corepack
      run: brew install corepack  
      
    - name: Enable Corepack
      run: corepack enable

    - name: Install dependencies using Yarn
      run: yarn install

Please see below snip for the same.

Screenshot 2024-11-18 at 3 51 49 PM

@daveisfera
Copy link
Author

Why isn't corepack installed by default like it was with previous versions of macOS?

I know that different use case are struggling whether to include yarn/corepack by default ([setup-node](https://github.com/actions/setup-node/issues/531), docker concerned about size, docker concerned about ease of use, but I think that the macOS base runner doesn't really have a size concern (or at least corepack isn't really moving that needle very much), and corepack is supposed to be included by default in an npm install and the yarn install instructions rely on that fact.

So I think that this should be fixed to match the behavior of previous macOS versions and project recommendations/defaults, but if it's really not going to be included, then I'd recommend installing it with npm rather than homebrew, because that's what the corepack project recommends.

@aartis17
Copy link
Contributor

Hi @daveisfera,

I run enabling corepack without installing it, its working, I cannot see any error.
Please see below github workflow :

name: Enable Corepack 

on:
  workflow_dispatch:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [ 'macos-15' ]
    runs-on: ${{ matrix.os }}

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
      
    - name: Enable Corepack
      run: corepack enable

Output:
Screenshot 2024-11-22 at 2 21 29 PM

@daveisfera
Copy link
Author

I run enabling corepack without installing it, its working, I cannot see any error.

I just tested and it's working, so it appears that corepack enable functionality has been fixed for macOS 15

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

No branches or pull requests

4 participants