tauri-apps / tauri

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

[bug] cargo tauri ios dev. tauri: command not found Command PhaseScriptExecution failed with a nonzero exit code #6573

Open mxismean opened 1 year ago

mxismean commented 1 year ago

Describe the bug

when i run: cargo tauri ios dev ... ... ... /bin/sh -c /Users/mx/Library/Developer/Xcode/DerivedData/chatgpt-gfqldbevlpvvxgeqawqlgyepngis/Build/Intermediates.noindex/chatgpt.build/debug-iphoneos/chatgpt_iOS.build/Script-4AACB566BF22B7233F2E816D.sh /Users/mx/Library/Developer/Xcode/DerivedData/chatgpt-gfqldbevlpvvxgeqawqlgyepngis/Build/Intermediates.noindex/chatgpt.build/debug-iphoneos/chatgpt_iOS.build/Script-4AACB566BF22B7233F2E816D.sh: line 2: tauri: command not found Command PhaseScriptExecution failed with a nonzero exit code

BUILD FAILED

The following build commands failed: PhaseScriptExecution Build\ Rust\ Code /Users/mx/Library/Developer/Xcode/DerivedData/chatgpt-gfqldbevlpvvxgeqawqlgyepngis/Build/Intermediates.noindex/chatgpt.build/debug-iphoneos/chatgpt_iOS.build/Script-4AACB566BF22B7233F2E816D.sh (in target 'chatgpt_iOS' from project 'chatgpt') (1 failure) Error command ["xcodebuild"] exited with code 65

Reproduction

No response

Expected behavior

No response

Platform and versions

Environment
  › OS: Mac OS 12.6.3 X64
  › Node.js: 16.18.1
  › npm: 8.19.2
  › pnpm: 7.29.0
  › yarn: 1.22.19
  › rustup: 1.25.2
  › rustc: 1.68.0
  › cargo: 1.68.0
  › Rust toolchain: stable-aarch64-apple-darwin

Packages
  › @tauri-apps/cli [NPM]: 2.0.0-alpha.4
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unexpected character 't' while parsing major version number")', /Users/mx/.cargo/registry/src/github.com-1ecc6299db9ec823/tauri-cli-2.0.0-alpha.4/src/info.rs:566:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  › @tauri-apps/api [NPM]: tauri-apps%

Stack trace

No response

Additional context

No response

pewsheen commented 1 year ago

Hi, are you using nvm or any other node version manager?

Since the script is running on /bin/sh, the environment might not be the same that you are using on your terminal thus the node and node modules it running are probably not the ones you expect.

kristianmandrup commented 6 months ago

I hit the same error after installing npm packages using bun. I believe I first used my ancient bun 0.1 to install, the updated my bun to 1.x. Later I realised I was behind on the node version as well (18.x) so I upgraded Node to 20.x. How can I make sure my node packages are installed with the same version as I use to run the app in the simulator? bun used a global cache, so I guess I would first have to clear that cache before doing a fresh package install?

https://bun.sh/docs/install/cache#minimizing-re-downloads

nashaofu commented 3 months ago

Same issue

lucasfernog commented 2 months ago

we made some recent changes to enhance this, can you tell us the steps you've done to initialize the project (tools, nvm, etc)?