Closed martin-opensky closed 10 months ago
I think that's because on macOS/Linux the PATH
environment variable is not inherited by default from your .bashrc
and similar shell files, can you try using this crate https://github.com/tauri-apps/fix-path-env-rs and see if it fixes the issue?
@amrbashir thanks for the speedy response! I’m new to the Rust ecosystem, coming from TypeScript. Could you point me in the right direction for when you say ‘use this crate’?
A crate for Rust is like a NPM package for Javascript/Typescript, also you can find the instructions in the README.md in https://github.com/tauri-apps/fix-path-env-rs
Thanks for the info. I’m away today but will take a look on Monday and will update you here.
@amrbashir This doesn't appear to work.
When I update my main.rs with the code mentioned here (https://github.com/tauri-apps/fix-path-env-rs) all of my plugins stop working.
So to be clear, I replace:
fn main() { tauri_app_lib::run() }
with
fn main() { let _ = fix_path_env::fix(); tauri::Builder::default() .run(tauri::generate_context!()) .expect("Failed to run Tauri application"); }
And when I do this, the app builds but even the dialog plugin stops working...
@amrbashir I fixed the issue - apologies I am new to Rust.
The fix was:
fn main() { let _ = fix_path_env::fix(); tauri_app_lib::run() }
But this is not in the https://github.com/tauri-apps/fix-path-env-rs repo, so perhaps this needs to be updated for Tauri v2?
Looks like you are using tauri 2.0.0-alpha template with mobile support which has a different structure than normal template. I will update the README to make it more general.
Describe the bug
When executing a simple command during dev (node -v) the command is successful but after deploying (yarn tauri build) and installing on MacOs, running the command fails and a 400 response is returned with the error "No such file or directory (os error 2)"
Reproduction
You can checkout this simple starter project: https://github.com/martin-opensky/create-tauri-2-next-14-app/tree/tauri-alpha-bug-1
Code is in: https://github.com/martin-opensky/create-tauri-2-next-14-app/blob/tauri-alpha-bug-1/src/components/ActionBar.tsx
Lines 81 - 88
Expected behavior
If the command works in dev it should work once the app is built
Platform and versions
Stack trace
No response
Additional context
No response