当我在 Mac OS Monterey 上安装并运行 Tauri 时,我立即收到错误

Wil*_*iam 6 node.js rust npm tauri

我通过以下方式安装它:

npm create tauri-app
Run Code Online (Sandbox Code Playgroud)

我选择了一个普通的 JavaScript 环境来编码。

我跑:

  cd app
  npm install
  npm run tauri dev
Run Code Online (Sandbox Code Playgroud)

结果是这个错误:

> app@0.0.0 tauri
> tauri dev

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/interface/rust.rs:762:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Run Code Online (Sandbox Code Playgroud)

我使用的是 Mac OS Monterey。

我在线搜索了该错误,似乎它可能与我的系统时间配置有关,但我不确定。

Wil*_*iam 6

您需要在 Tauri 之前安装 Rust。安装 Tauri 不包括 Rust。

安装说明,根据Rust 的文档

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh


Mig*_*llo 5

答案是

cargo install tauri-cli
Run Code Online (Sandbox Code Playgroud)

这将安装tauri命令和 cli 以便能够执行该tauri应用程序。

这只会安装 Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Run Code Online (Sandbox Code Playgroud)