tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
83.66k stars 2.51k forks source link

[bug][Tauri 2.0] Homebrew errors when running `tauri ios init` command on M1 Mac #6203

Closed widersky closed 7 months ago

widersky commented 1 year ago

Describe the bug

When executing the yarn tauri ios init command, an error appears as below:

image

Reproduction

  1. Initialize Tauri 2.0 app with mobile workflow
  2. Use yarn tauri ios init command
  3. See the error

Expected behavior

No errors - using Hombrew commands directly to install packages runs without any problems.

Platform and versions

$ tauri info

Environment › OS: Mac OS 13.2.0 X64 › Node.js: 16.19.0 › npm: 8.19.3 › pnpm: 7.18.2 › yarn: 1.22.19 › rustup: 1.25.1 › rustc: 1.67.0 › cargo: 1.67.0 › Rust toolchain: stable-aarch64-apple-darwin

Packages › @tauri-apps/cli [NPM]: 2.0.0-alpha.2 › @tauri-apps/api [NPM]: 2.0.0-alpha.0 › tauri [RUST]: 2.0.0-alpha.3, › tauri-build [RUST]: 2.0.0-alpha.1, › tao [RUST]: 0.17.0, › wry [RUST]: 0.26.0,

App › build-type: bundle › CSP: unset › distDir: ../dist › devPath: http://localhost:1420/ › framework: React › bundler: Vite

App directory structure ├─ node_modules ├─ public ├─ src-tauri ├─ .vscode └─ src ✨ Done in 9.17s.

Stack trace

No response

Additional context

No response

kxxoling commented 9 months ago

It says Command "brew reinstall xcodegen" didn't complete successfully, exiting with code 1.: Command "brew reinstall xcodegen" didn't complete successfully, just try to reinstall xcodegen again?

slimandslam commented 8 months ago

Same thing here. $ brew reinstall xcodegen works fine. Running xcodegen from the command line works fine. There is something wrong with the "yarn tauri ios init" command

P5ina commented 7 months ago

Same issue, any workarounds?

kasparv commented 7 months ago

I can confirm this happens on M2 too.

ken0x0a commented 7 months ago

intel mac also.

syirilrakhulh commented 7 months ago

Any solutions?

lucasfernog commented 7 months ago

I'm working on the fix for this. Will be released today.

kristianmandrup commented 7 months ago

It looks like the tauri CLI included in package.json by the project creator has not been updated to 2.0. Try using this:

  "devDependencies": {
    "@tauri-apps/cli": ">=2.0.0-beta.0",
  }

I figured it out by looking at https://github.com/atilafassina/quantum/blob/main/package.json based on this video https://www.youtube.com/watch?v=W539_PP4Y98