Fix Windows build: set npm os=win32 before installing
Some checks failed
Build App / build-windows (push) Failing after 1m47s
Build App / build-linux (push) Has been cancelled

The Gitea act runner sets npm's os config to linux even on Windows,
causing npm to skip Windows-specific optional deps like rollup and
esbuild native bindings. Explicitly set os=win32 before npm install.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 07:59:17 -08:00
parent 3f96c45d9e
commit 476d3a9727

View File

@@ -116,6 +116,12 @@ jobs:
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%" set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
cargo install tauri-cli --version "^2" cargo install tauri-cli --version "^2"
- name: Fix npm platform detection
run: |
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
npm config set os win32
npm config list
- name: Install frontend dependencies - name: Install frontend dependencies
working-directory: ./app working-directory: ./app
run: | run: |
@@ -123,7 +129,6 @@ jobs:
if exist node_modules rmdir /s /q node_modules if exist node_modules rmdir /s /q node_modules
if exist package-lock.json del package-lock.json if exist package-lock.json del package-lock.json
npm install npm install
npm install @rollup/rollup-win32-x64-msvc @esbuild/win32-x64 --no-save
- name: Build frontend - name: Build frontend
working-directory: ./app working-directory: ./app