Fix Windows build: install Tauri CLI via cargo, use npm install
The npm @tauri-apps/cli package uses platform-specific optional dependencies that don't resolve correctly when the lockfile was generated on Linux. Install tauri-cli via cargo instead, and use npm install (not npm ci) to resolve Windows-native packages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -110,17 +110,22 @@ jobs:
|
||||
node --version
|
||||
npm --version
|
||||
|
||||
- name: Install Tauri CLI via cargo
|
||||
run: |
|
||||
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
||||
cargo install tauri-cli --version ^2
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./app
|
||||
run: |
|
||||
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
||||
npm ci
|
||||
npm install
|
||||
|
||||
- name: Build Tauri app
|
||||
working-directory: ./app
|
||||
run: |
|
||||
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
||||
npx tauri build
|
||||
cargo tauri build
|
||||
|
||||
- name: Upload Windows artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user