From faed7394a709a8b0a03c25add437696e5f73765d Mon Sep 17 00:00:00 2001 From: artus9033 Date: Fri, 9 Aug 2024 00:29:15 +0200 Subject: [PATCH] fix(cd): install optional packages manually in CD workflow --- .github/workflows/cd.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2ecbf8606..606cc21d4 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -30,6 +30,12 @@ jobs: ${{ runner.os }}-npm-${{ hashFiles('/package-lock.json') }} ${{ runner.os }}-npm- + # since npm ci installs only dependencies in package-lock.json, it may be that the package-lock.json pushed + # has been generated on non-linux, making the installed node_modules lack packages needed by the linux runner + - name: Ensure lefthook-linux-x64 & @rollup/rollup-linux-x64-gnu are installed + if: steps.cache-node_modules.outputs.cache-hit != 'true' + run: npm i --legacy-peer-deps lefthook-linux-x64 @rollup/rollup-linux-x64-gnu + - name: Install npm dependencies if: steps.cache-node_modules.outputs.cache-hit != 'true' run: npm ci --legacy-peer-deps