Skip to content

fix(tauri): fix broken Windows desktop build#747

Closed
naman79820 wants to merge 14 commits intoCircuitVerse:mainfrom
naman79820:fix/tauri-windows-build
Closed

fix(tauri): fix broken Windows desktop build#747
naman79820 wants to merge 14 commits intoCircuitVerse:mainfrom
naman79820:fix/tauri-windows-build

Conversation

@naman79820
Copy link
Contributor

@naman79820 naman79820 commented Jan 8, 2026

Fixes #726

Describe the changes you have made in this PR -

This PR fixes the broken Windows desktop build by removing platform-specific assumptions and making the Tauri build process consistent across local development and CI.

Previously, the desktop build relied on Unix-only shell behavior (bash, inline environment variables, cp) which failed on Windows. In addition, npm install was unstable on fresh setups and often required --legacy-peer-deps to proceed. There were also inconsistencies between local and CI environments, leading to unreliable builds.

This PR resolves the issue by:

  • Aligning Tauri Rust, CLI, and JavaScript API versions to compatible releases
  • Standardizing on Node 18 (LTS) for both local development and CI
  • Replacing the bash-based frontend build with a Node-based build.js for cross-platform compatibility
  • Updating tauri.conf.json to use a cross-platform beforeBuildCommand via cross-env and Node instead of shell-specific syntax
  • Fixing CI working directories so the frontend build runs from the project root
  • Adding Windows to the CI build matrix to continuously verify the fix
  • Committing package-lock.json and Cargo.lock to ensure deterministic installs across environments

With these changes:

  • npm install works without requiring --legacy-peer-deps
  • npm run build works consistently across platforms
  • npm run tauri build completes successfully on Windows
  • Windows installers (.msi and .exe) are generated correctly
  • CI builds are stable and match local behavior on Windows, macOS, and Linux

Screenshots of the changes (If any) -

N/A (Build and CI related changes only)

image image image

Note: Please check Allow edits from maintainers if you would like us to assist in the PR.

@netlify
Copy link

netlify bot commented Jan 8, 2026

Deploy Preview for circuitverse ready!

Name Link
🔨 Latest commit fa27449
🔍 Latest deploy log https://app.netlify.com/projects/circuitverse/deploys/69629afe4824510008eea7df
😎 Deploy Preview https://deploy-preview-747--circuitverse.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 43 (🔴 down 1 from production)
Accessibility: 69 (🔴 down 4 from production)
Best Practices: 92 (no change from production)
SEO: 82 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

This PR updates build tooling and dependencies: Tauri crates and JS packages are bumped (tauri, tauri-build, tauri plugins, @tauri-apps/*, vuetify, vite-plugin-vuetify, @tauri-apps/cli), package scripts are changed (replaces a shell build.sh with node build.js), a new build.js is added to run Vite builds per-version, GitHub Actions workflow is adjusted (matrix/platforms, Node 18, npm cache), and tauri.conf.json now uses cross-env and a Node one-liner for copying the built index file.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(tauri): fix broken Windows desktop build' directly addresses the main objective of this PR, which is to fix the broken Windows Tauri build as described in issue #726.
Linked Issues check ✅ Passed The PR successfully addresses issue #726 by aligning Tauri/CLI/API versions, switching CI to Node 18 LTS, replacing Unix-specific bash scripts with cross-platform Node alternatives (build.js, cross-env), updating beforeBuildCommand, and fixing CI working directories to ensure deterministic builds across platforms.
Out of Scope Changes check ✅ Passed All changes are in-scope: dependency updates support the Windows build fix, build.js replaces bash build script, cross-env enables cross-platform CLI usage, tauri.conf.json aligns with the new build approach, and CI workflow changes ensure Windows builds work consistently with local development.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @package.json:
- Line 20: The package entry for "@tauri-apps/api" still uses a caret range
("^2.3.1") which allows non-deterministic upgrades; edit the package.json
dependency for "@tauri-apps/api" to remove the caret and pin it to "2.3.1" so
the version is exact and deterministic, then run a quick npm install or yarn
install to regenerate lockfile if needed to reflect the pinned version.

In @src-tauri/Cargo.toml:
- Around line 25-27: The tauri-plugin-http version (tauri-plugin-http = "2.5.2")
is incompatible with your Tauri 2.3.1 dependency; either upgrade Tauri to 2.8.2
or change the tauri-plugin-http dependency to a 2.3.x release compatible with
Tauri 2.3.1 (for example replace "2.5.2" with a 2.3.* version) in Cargo.toml so
the crate versions align.
🧹 Nitpick comments (1)
package.json (1)

21-22: Consider pinning plugin package versions to match Rust dependencies.

While the Rust side pins tauri-plugin-http to 2.5.2 and tauri-plugin-fs to 2.2.0 in Cargo.toml, the corresponding JavaScript packages still have caret prefixes here. This creates a potential version mismatch where the JS side could auto-upgrade while the Rust side remains pinned, potentially causing the same build issues this PR aims to resolve.

📌 Proposed fix to pin plugin versions
-        "@tauri-apps/plugin-fs": "^2.2.0",
-        "@tauri-apps/plugin-http": "^2.5.2",
+        "@tauri-apps/plugin-fs": "2.2.0",
+        "@tauri-apps/plugin-http": "2.5.2",
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f071795 and f08bd2a.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • package.json
  • src-tauri/Cargo.toml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-07T19:39:24.443Z
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:24.443Z
Learning: In Node 18 environments (e.g., this repo cv-frontend-vue), pin cross-env to 7.x (e.g., ^7.0.3) because cross-env 10.x requires Node >= 20. When editing package.json, ensure cross-env version stays within 7.x to maintain compatibility with Node 18.

Applied to files:

  • package.json

@naman79820 naman79820 changed the title fix(tauri): lock JS and Rust deps to stable 2.3.x versions fix(tauri): fix broken Windows desktop build Jan 8, 2026
@naman79820
Copy link
Contributor Author

ready to review @tachyons @ThatDeparted2061 :)))

@tachyons
Copy link
Member

tachyons commented Jan 9, 2026

@naman79820 Build is not fixed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/tauri-build.yml (2)

31-33: Node.js version mismatch with project target.

The project targets Node.js 18 (dependencies like cross-env are pinned to 7.x specifically because 10.x requires Node ≥20). Using Node 22 in CI may mask compatibility issues that users on Node 18 will encounter.

🐛 Proposed fix
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: 22
+          node-version: 18

Based on learnings, the project explicitly targets Node.js 18.


60-72: projectPath and frontendDist configuration mismatch will cause build failure.

The current setup has a critical path misalignment:

  1. Frontend is built to ./src/dist/ (in the workflow)
  2. tauri.conf.json specifies "frontendDist": "../dist" (points to root-level dist/)
  3. With projectPath: ./src-tauri, Tauri will look for the frontend distribution at the wrong location

Per the learning from the prior PR, projectPath should be set to . (root) so that beforeBuildCommand runs from the root directory where package.json and dist/ are located. The current projectPath: ./src-tauri causes path references in tauri.conf.json to become inconsistent with where the frontend is actually built.

Correct either:

  • Change projectPath to . and ensure beforeBuildCommand and frontend build steps produce output at root-level dist/, OR
  • Keep projectPath: ./src-tauri and update frontendDist in tauri.conf.json to ./src/dist to match where the frontend is built
🤖 Fix all issues with AI agents
In @.github/workflows/tauri-build.yml:
- Around line 16-22: The CI build matrix in the tauri workflow is missing a
Windows entry so the Windows desktop build cannot be validated; update the
include matrix block to add a Windows runner (e.g., platform: windows-latest)
with appropriate args/targets for the Windows desktop build (such as --target
x86_64-pc-windows-msvc or the required Tauri/ru targets) so the workflow runs on
Windows in addition to macOS and Ubuntu; ensure the new entry mirrors the
existing structure and any platform-specific args used for macOS/ubuntu.
- Around line 50-58: The workflow steps "Install Frontend Dependencies" and
"Build Frontend (Vue)" are running with working-directory: ./src causing npm to
miss package.json; update those steps (the ones named "Install Frontend
Dependencies" and "Build Frontend (Vue)") to remove the working-directory
directive or set it to "." so that npm install and the build command (npx
cross-env DESKTOP_MODE=true npm run build plus the node copy command) execute
from the repository root.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6072312 and d237f4e.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • .github/workflows/tauri-build.yml
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:33.959Z
Learning: The cv-frontend-vue project targets Node.js 18, so cross-env is intentionally kept at version 7.x (currently ^7.0.3) because cross-env10.x requires Node >=20.
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.
📚 Learning: 2025-12-30T10:11:52.399Z
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.

Applied to files:

  • .github/workflows/tauri-build.yml
🔇 Additional comments (1)
.github/workflows/tauri-build.yml (1)

74-79: Artifact upload pattern looks correct.

The consolidated glob pattern src-tauri/target/**/release/bundle/** should capture all platform-specific bundle outputs (.app, .deb, .msi, etc.) without needing separate patterns per platform.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/tauri-build-test.yml:
- Around line 11-29: The workflow uses runs-on: ubuntu-22.04 but installs
libwebkit2gtk-4.1-dev which is mismatched for 22.04; either switch runs-on to
ubuntu-24.04 (update the runs-on value to ubuntu-24.04) if you require WebKitGTK
4.1, or keep runs-on: ubuntu-22.04 and replace libwebkit2gtk-4.1-dev with the
22.04-compatible package (e.g., libwebkit2gtk-4.0-dev) in the Install Linux
dependencies step; update the workflow accordingly so runs-on and the WebKitGTK
package version align.
- Around line 16-18: The workflow should use npm ci for reproducible,
lockfile-based installs in CI: update the frontend install step to run npm ci
instead of npm install while leaving the existing actions/setup-node@v4
configuration and node-version: 22 unchanged (do not change the Node version);
locate the job that uses actions/setup-node@v4 and the step that runs the
frontend install command and replace the install command with npm ci so the
lockfile is strictly respected.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4954d17 and 41c049f.

📒 Files selected for processing (1)
  • .github/workflows/tauri-build-test.yml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:33.959Z
Learning: The cv-frontend-vue project targets Node.js 18, so cross-env is intentionally kept at version 7.x (currently ^7.0.3) because cross-env10.x requires Node >=20.
📚 Learning: 2025-12-30T10:11:52.399Z
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.

Applied to files:

  • .github/workflows/tauri-build-test.yml
🔇 Additional comments (2)
.github/workflows/tauri-build-test.yml (2)

3-5: Workflow scope looks correct for “test-only” (manual trigger, read-only perms).
No concerns with workflow_dispatch + minimal contents: read.

Also applies to: 9-10


39-44: Version pinning recommended for tauri-apps/tauri-action.

The current projectPath: ./src-tauri is correct for this repo structure since src-tauri is a subdirectory at the root; tauri-action is designed to handle this scenario and will properly resolve paths relative to projectPath. Consider pinning tauri-apps/tauri-action@v0 to a specific version like @v0.6.0 instead of the floating tag for reproducibility and to avoid unexpected behavior changes.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @package.json:
- Line 45: Update the outdated pre-release Vuetify and plugin entries in
package.json: replace "vuetify": "3.0.0-beta.4" and "vite-plugin-vuetify":
"1.0.0-alpha.12" with the current stable releases (e.g., "vuetify": "3.11.6" and
"vite-plugin-vuetify": "2.1.2"), then regenerate the lockfile by running your
package manager install (npm/yarn/pnpm) and rebuild the app (including the Tauri
window) to verify the frontend loads; adjust any Vuetify plugin import/config
code if breaking changes surface after upgrading.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41c049f and 44019d8.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/tauri-build.yml
  • build.js
  • package.json
  • src-tauri/Cargo.toml
  • src-tauri/tauri.conf.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/tauri-build.yml
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:33.959Z
Learning: The cv-frontend-vue project targets Node.js 18, so cross-env is intentionally kept at version 7.x (currently ^7.0.3) because cross-env10.x requires Node >=20.
📚 Learning: 2025-12-30T10:11:52.399Z
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.

Applied to files:

  • src-tauri/tauri.conf.json
  • package.json
📚 Learning: 2026-01-07T19:39:33.959Z
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:33.959Z
Learning: The cv-frontend-vue project targets Node.js 18, so cross-env is intentionally kept at version 7.x (currently ^7.0.3) because cross-env10.x requires Node >=20.

Applied to files:

  • src-tauri/tauri.conf.json
📚 Learning: 2026-01-07T19:39:24.443Z
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:24.443Z
Learning: In Node 18 environments (e.g., this repo cv-frontend-vue), pin cross-env to 7.x (e.g., ^7.0.3) because cross-env 10.x requires Node >= 20. When editing package.json, ensure cross-env version stays within 7.x to maintain compatibility with Node 18.

Applied to files:

  • package.json
🔇 Additional comments (6)
src-tauri/tauri.conf.json (1)

10-11: Good cross-platform fix for Windows compatibility.

Replacing the shell-based cp command with a Node.js fs.copyFileSync one-liner and using cross-env for environment variables ensures this command works correctly on Windows (where cp isn't available in CMD/PowerShell by default). This directly addresses the Windows build issue.

package.json (3)

7-7: Good cross-platform build script change.

Switching from bash build.sh to node build.js ensures Windows compatibility since Bash isn't available by default on Windows. This aligns with the PR objective.


20-22: Tauri JS/Rust version alignment looks reasonable.

The pinned versions remove version drift:

  • @tauri-apps/api: 2.9.0
  • @tauri-apps/cli: 2.9.5
  • tauri (Rust): 2.9.5

The CLI and core Rust crate are aligned at 2.9.5, while the JS API at 2.9.0 should be compatible. Based on learnings, cross-env at ^7.0.3 is correctly chosen for Node 18 compatibility.

Also applies to: 52-52


57-57: Cross-env version is appropriate for Node 18.

Using ^7.0.3 is correct since cross-env 10.x requires Node ≥20, and this project targets Node 18. Based on learnings.

src-tauri/Cargo.toml (1)

17-27: All Tauri dependencies are correctly pinned to the latest stable versions.

The exact version pins (=) are verified to exist on crates.io and ensure reproducible builds:

  • tauri-build 2.5.3 ✓
  • tauri 2.9.5 ✓
  • tauri-plugin-http 2.5.2 ✓
  • tauri-plugin-log 2.0.0 ✓
  • tauri-plugin-fs 2.4.5 ✓

The different version numbers between tauri-build and tauri are normal—these are independently versioned projects. No compatibility concerns.

build.js (1)

1-10: Version-specific Vite config files exist; no issues.

Both vite.config.v0.ts and vite.config.v1.ts are present at the repository root, so the build script will locate the correct configuration files.

@naman79820
Copy link
Contributor Author

Hey @tachyonic 👋
Just wanted to update you npm run tauri build is working fine for me now.

The workflow and local build were relying on Unix-style commands (bash, inline env vars, cp), which worked in CI but caused problems on Windows. There was also a Node version mismatch (CI using Node 22 while local/dev works reliably on Node 18).

To fix this, I made the workflow a bit more deterministic:

  • Switched CI to Node 18 to match local setup
  • Replaced the bash-based frontend build with a small build.js script so it runs cross-platform
  • Updated the Tauri beforeBuildCommand to use cross-env + Node instead of shell-specific syntax

After these changes, both npm run build and npm run tauri build complete successfully, and the Windows installers are generated correctly.

@naman79820
Copy link
Contributor Author

ready to review as well :)) @tachyons @ThatDeparted2061

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @package.json:
- Around line 20-22: The package.json dependency @tauri-apps/plugin-http is
pinned to 2.5.5 but Cargo.toml uses tauri-plugin-http 2.5.2; update one side so
both match (either change the package.json entry "@tauri-apps/plugin-http":
"2.5.5" to "2.5.2" to match Cargo.toml, or bump tauri-plugin-http in Cargo.toml
to 2.5.5) and ensure no caret is added so the JS and Rust plugin versions remain
deterministic.

In @src-tauri/tauri.conf.json:
- Around line 10-11: Update the beforeBuildCommand so the inline Node script
checks for the source file before copying: in the existing beforeBuildCommand
replace the direct
require('fs').copyFileSync('dist/index-cv.html','dist/index.html') call with a
small guard that uses require('fs').existsSync('dist/index-cv.html') (or a
try/catch) and only calls copyFileSync when the file exists, preserving
cross-platform behavior and avoiding a thrown error if dist/index-cv.html is
missing.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41c049f and 8adf2e3.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/tauri-build.yml
  • build.js
  • package.json
  • src-tauri/Cargo.toml
  • src-tauri/tauri.conf.json
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:33.959Z
Learning: The cv-frontend-vue project targets Node.js 18, so cross-env is intentionally kept at version 7.x (currently ^7.0.3) because cross-env10.x requires Node >=20.
📚 Learning: 2025-12-30T10:11:52.399Z
Learnt from: senutpal
Repo: CircuitVerse/cv-frontend-vue PR: 706
File: .github/workflows/tauri-release.yml:51-51
Timestamp: 2025-12-30T10:11:52.399Z
Learning: In cv-frontend-vue repository, the tauri-action's `projectPath` should be set to `.` (root) because the `beforeBuildCommand` needs to run from the root directory where `package.json` and `dist/` are located. The Tauri CLI automatically locates `src-tauri/tauri.conf.json` from the project root.

Applied to files:

  • src-tauri/tauri.conf.json
  • .github/workflows/tauri-build.yml
  • package.json
📚 Learning: 2026-01-07T19:39:33.959Z
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:33.959Z
Learning: The cv-frontend-vue project targets Node.js 18, so cross-env is intentionally kept at version 7.x (currently ^7.0.3) because cross-env10.x requires Node >=20.

Applied to files:

  • src-tauri/tauri.conf.json
📚 Learning: 2026-01-07T19:39:24.443Z
Learnt from: naman79820
Repo: CircuitVerse/cv-frontend-vue PR: 729
File: package.json:56-56
Timestamp: 2026-01-07T19:39:24.443Z
Learning: In Node 18 environments (e.g., this repo cv-frontend-vue), pin cross-env to 7.x (e.g., ^7.0.3) because cross-env 10.x requires Node >= 20. When editing package.json, ensure cross-env version stays within 7.x to maintain compatibility with Node 18.

Applied to files:

  • package.json
🔇 Additional comments (11)
package.json (3)

7-7: Build script migration to Node.js is correct.

The change from bash build.sh to node build.js aligns with the PR objective of making the build process cross-platform.


57-57: cross-env version is appropriate for Node 18.

The ^7.0.3 version is correct since cross-env 10.x requires Node ≥20, and this project targets Node 18. Based on learnings.


45-45: Vuetify pinned to exact beta version.

Pinning to 3.0.0-beta.4 without a caret ensures stability during development. Since this is a beta version, this is prudent to avoid unexpected breaking changes.

src-tauri/Cargo.toml (2)

24-27: Tauri dependency versions align well with JS counterparts.

The core tauri version (2.9.5) matches the CLI, and plugin versions are appropriately pinned. The devtools feature inclusion is useful for development debugging.


18-18: Remove concern about tauri-build version—it is correctly pinned.

The tauri-build version 2.5.3 is explicitly required by tauri 2.9.5. This pairing is defined in tauri's official Cargo metadata and is the correct and tested combination; no action needed.

Likely an incorrect or invalid review comment.

.github/workflows/tauri-build.yml (5)

17-24: Matrix configuration correctly adds Windows support.

The matrix now explicitly includes windows-latest with empty args, which is appropriate for Windows builds. The macOS entries properly specify architecture targets.


31-34: Node 18 with npm caching is correct.

Using Node.js 18 (LTS) aligns with the project's target environment and the cross-env 7.x dependency constraint. Enabling npm caching improves CI performance.


52-58: Frontend build uses cross-platform commands with proper working directory.

The working-directory: . ensures the build runs from the project root where package.json and dist/ are located. The Node-based file copy with existence check is more robust than the version in tauri.conf.json. Based on learnings.


65-65: Verify projectPath configuration.

The projectPath: ./src-tauri may conflict with the expected configuration. Based on learnings, the projectPath should be set to . (root) because the beforeBuildCommand needs to run from the root directory where package.json and dist/ are located.

However, since beforeBuildCommand is already executed separately in the workflow's "Build Frontend" step, this may work correctly. Please verify this works as expected in CI.


73-83: Artifact upload paths cover all platform outputs.

The upload paths correctly include artifacts for all platforms: DMG/app for macOS, MSI/EXE for Windows, and DEB/AppImage for Linux.

build.js (1)

1-10: Cross-platform build script looks good.

The script correctly replaces the bash-based build with a Node.js equivalent. Using execSync with stdio: "inherit" properly forwards output and throws on build failures, which is the desired behavior for a build script. The required version-specific Vite config files (vite.config.v0.ts and vite.config.v1.ts) exist in the repository.

@naman79820
Copy link
Contributor Author

Hey @tachyons Could you please re run the CI when you get a chance?

@naman79820
Copy link
Contributor Author

Hey @tachyons @ThatDeparted2061
The builds are actually completing fine on all platforms (Windows/macOS/Linux). The CI is failing at the very end because the workflow tries to create a GitHub release during a PR run, which isn’t permitted. It’s a workflow config issue, not a build failure. Happy to tweak the workflow so release creation only happens on release events.

@tachyons
Copy link
Member

Don't draft release with this workflow.This is just to make sure that build works on each platform, and they can be tested by downloading the artefacts

@naman79820
Copy link
Contributor Author

checks passed @tachyons @ThatDeparted2061 :))

@naman79820
Copy link
Contributor Author

Closing as the issue has been fixed by someone else

@naman79820 naman79820 closed this Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug: Windows Tauri build fails due to Vuetify 2 imports (frontend blocker)

3 participants