From ca7e5578f2e1d75593b3394692d903ce9d28340a Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Wed, 9 Apr 2025 19:13:42 -0700 Subject: [PATCH] Globally install corepack --- .github/actions/setup-javascript/action.yml | 2 +- Dockerfile | 2 +- Vagrantfile | 2 +- bin/setup | 2 +- streaming/Dockerfile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-javascript/action.yml b/.github/actions/setup-javascript/action.yml index 808adc7de6..747d433463 100644 --- a/.github/actions/setup-javascript/action.yml +++ b/.github/actions/setup-javascript/action.yml @@ -16,7 +16,7 @@ runs: # The following is needed because we can not use `cache: true` for `setup-node`, as it does not support Corepack yet and mess up with the cache location if ran after Node is installed - name: Enable corepack shell: bash - run: corepack enable + run: npm i -g corepack - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/Dockerfile b/Dockerfile index 6620f4c096..330b9aae2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -286,7 +286,7 @@ COPY --from=node /usr/local/lib /usr/local/lib RUN \ # Configure Corepack rm /usr/local/bin/yarn*; \ - corepack enable; \ + npm i -g corepack; \ corepack prepare --activate; # hadolint ignore=DL3008 diff --git a/Vagrantfile b/Vagrantfile index ce456060cd..8ed3ff072b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -115,7 +115,7 @@ gem install bundler foreman bundle install # Install node modules -sudo corepack enable +sudo npm i -g corepack corepack prepare yarn install diff --git a/bin/setup b/bin/setup index 4ccf4594b4..b3dbece5e6 100755 --- a/bin/setup +++ b/bin/setup @@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do system('bundle check') || system!('bundle install') puts "\n== Installing JS dependencies ==" - system! 'corepack enable' + system! 'npm i -g corepack' system! 'bin/yarn install --immutable' puts "\n== Preparing database ==" diff --git a/streaming/Dockerfile b/streaming/Dockerfile index 14f2d3c7e7..67304cffc0 100644 --- a/streaming/Dockerfile +++ b/streaming/Dockerfile @@ -96,7 +96,7 @@ RUN \ --mount=type=cache,id=yarn-cache-${TARGETPLATFORM},target=/usr/local/share/.cache/yarn,sharing=locked \ # Configure Corepack rm /usr/local/bin/yarn*; \ - corepack enable; \ + npm i -g corepack; \ corepack prepare --activate; RUN \