Skip to content

Commit 450cfcb

Browse files
fix: install Tauri CLI native module for platform
Deno npm compatibility mode skips optional dependencies, which @tauri-apps/cli uses for platform-specific native binaries. Add explicit npm install step for the correct native module based on runner architecture and OS. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6e4cd3e commit 450cfcb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/actions/setup-tauri-build/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@ runs:
4040
shell: bash
4141
run: deno install --node-modules-dir=auto
4242

43+
- name: Install Tauri CLI native module
44+
shell: bash
45+
run: |
46+
# Deno doesn't install optional dependencies (platform-specific native modules)
47+
# Install the Tauri CLI native module explicitly for the current platform
48+
ARCH=$(uname -m)
49+
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
50+
if [[ "$ARCH" == "arm64" || "$ARCH" == "aarch64" ]]; then
51+
TAURI_NATIVE_PKG="@tauri-apps/cli-${OS}-arm64"
52+
else
53+
TAURI_NATIVE_PKG="@tauri-apps/cli-${OS}-x64"
54+
fi
55+
echo "Installing $TAURI_NATIVE_PKG..."
56+
npm install "$TAURI_NATIVE_PKG" --no-save
57+
4358
- name: Setup Rust (iOS)
4459
if: inputs.platform == 'ios'
4560
uses: dtolnay/rust-toolchain@stable

0 commit comments

Comments
 (0)