Skip to content

Commit 7886dca

Browse files
authored
Merge pull request #106 from danribes/claude/follow-next-task-prompt-01Prwo5GytFEBAvsrRHz4RBR
Fix build: remove only canvas, keep rollup native deps
2 parents 6b02667 + c6e0cd0 commit 7886dca

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.github/workflows/build-installer.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,16 @@ jobs:
7474
# -----------------------------------------------------------------------
7575
- name: Install desktop app dependencies
7676
working-directory: desktop-app
77-
run: npm ci --omit=optional
77+
run: npm ci
78+
79+
- name: Remove canvas (optional dep that fails to build on Windows CI)
80+
working-directory: desktop-app
81+
run: |
82+
if (Test-Path "node_modules/canvas") {
83+
Remove-Item -Recurse -Force "node_modules/canvas"
84+
Write-Host "Removed canvas package"
85+
}
86+
shell: pwsh
7887

7988
- name: Build desktop app
8089
working-directory: desktop-app

desktop-app/.npmrc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Skip optional dependencies that require native compilation
2-
# This prevents canvas (optional dep of pdfjs-dist) from being installed
3-
# canvas requires GTK/Cairo which isn't available on Windows CI runners
4-
omit=optional
1+
# Note: canvas is an optional dependency of pdfjs-dist that requires GTK/Cairo
2+
# to compile. It's removed in the CI workflow after npm install to avoid
3+
# build failures on Windows runners.
4+
#
5+
# Do NOT use omit=optional here as it breaks @rollup/rollup-win32-x64-msvc
6+
# which is needed for Vite to build on Windows.

0 commit comments

Comments
 (0)