[bug] Unable to compile rust backend on Nixos 24.05
Closed this issue · 1 comments
Caden-Z commented
Describe the bug
Running npm run tauri dev
or any tauri related command causes the following error
thread '<unnamed>' panicked at crates/tauri-cli/src/interface/rust.rs:1099:14:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
Reproduction
- Create a new empty project using
npm create tauri-app@latest
- Run
nix-shell
after creatingshell.nix
using the one given on wiki - Run
npm install
- Run
npm run tauri dev
Expected behavior
The tauri program should compile and launch with no errors.
Full tauri info
output
> myelin@0.1.0 tauri
> tauri info
[✔] Environment
- OS: NixOS 24.5.0 x86_64 (X64)
✔ webkit2gtk-4.1: 2.44.2
✔ rsvg2: 2.58.1
✔ rustc:
✔ cargo: 1.77.1
✔ rustup: 1.26.0 (1980-01-01)
✔ Rust toolchain:
- node: 20.12.2
- npm: 10.5.0
- bun: 1.1.8
[-] Packages
- tauri 🦀: 2.1.1
- tauri-build 🦀: 2.0.3
- wry 🦀: 0.47.2
- tao 🦀: 0.30.8
- tauri-cli 🦀: 1.5.14
- @tauri-apps/api : 2.1.1
- @tauri-apps/cli : 2.1.0
[-] Plugins
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: Vue.js
- bundler: Vite
Stack trace
thread '<unnamed>' panicked at crates/tauri-cli/src/interface/rust.rs:1099:14:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: 0x7ff840abbc89 - <unknown>
1: 0x7ff84060ddfb - <unknown>
2: 0x7ff840a811a2 - <unknown>
3: 0x7ff840abf0f8 - <unknown>
4: 0x7ff840abffb0 - <unknown>
5: 0x7ff840abfa62 - <unknown>
6: 0x7ff840abf9f9 - <unknown>
7: 0x7ff840abf9e4 - <unknown>
8: 0x7ff8405338c2 - <unknown>
9: 0x7ff84053397b - <unknown>
10: 0x7ff840533d78 - <unknown>
11: 0x7ff840c8d3a2 - <unknown>
12: 0x7ff840560c14 - <unknown>
13: 0x7ff840566db5 - <unknown>
14: 0x7ff840ac2dfb - <unknown>
15: 0x7ff8446a1272 - start_thread
16: 0x7ff84471cdec - clone3
17: 0x0 - <unknown>
Aborted (core dumped)
Additional context
This does not happen for me on windows but does for both the nixos installation on my desktop and laptop. I've tried using both bun and npm.
Caden-Z commented
Never mind no version of rustc was correctly installed, apologies for the trouble!