Skip to content

Commit 7a146e8

Browse files
committed
Fix optional dependencies after cache restore
This commit addresses an issue where optional dependencies were not properly installed after restoring the `node_modules` directory from the cache.
1 parent 6e4a2df commit 7a146e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
# Use npm ci with --include=optional to handle platform-specific binaries
3939
npm ci --include=optional
4040
41+
- name: Fix optional dependencies after cache restore
42+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
43+
run: |
44+
# When cache is restored, rebuild rollup to fix optional dependency linking
45+
npm rebuild rollup --include=optional
46+
4147
- name: Verify installation
4248
run: |
4349
# Quick verification that problematic packages work

0 commit comments

Comments
 (0)