Skip to content

Commit c5294ae

Browse files
committed
Apply comprehensive fix for Rollup optional dependencies in CI
1 parent 4999294 commit c5294ae

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ jobs:
2020

2121
- name: Install dependencies
2222
run: |
23-
# First try npm ci, if it fails due to optional dependencies, use workaround
24-
npm ci --ignore-scripts || {
25-
echo "npm ci failed, applying workaround for optional dependencies bug"
26-
rm -rf node_modules package-lock.json
27-
npm install --ignore-scripts
28-
}
23+
# Apply workaround for npm optional dependencies bug with Rollup
24+
echo "Applying workaround for Rollup optional dependencies issue"
25+
rm -rf node_modules package-lock.json
26+
npm install --ignore-scripts
27+
28+
# Verify Rollup binary is available
29+
if ! npm list @rollup/rollup-linux-x64-gnu >/dev/null 2>&1; then
30+
echo "Installing Rollup Linux binary explicitly"
31+
npm install @rollup/rollup-linux-x64-gnu --no-save || echo "Manual Rollup install failed"
32+
fi
2933
3034
- name: Run tests (if any)
3135
continue-on-error: true

0 commit comments

Comments
 (0)