为什么运行命令“npm run tauri”时出错?

发布于 2025-01-12 18:51:42 字数 895 浏览 0 评论 0原文

C:\WINDOWS\System32\tauri-app>npm run tauri

[电子邮件受保护] tauri 金牛座开发

[tauri:dev] 运行 yarn dev 纱线运行 v1.22.17 $ 维特 预捆绑依赖项: 视图 (仅当您的依赖项或配置发生更改时才会运行)

vite v2.8.6 开发服务器运行于:

本地:http://localhost:3000/ 网络:使用 --host 公开

在 523 毫秒内公开就绪。

Updating crates.io index

警告:虚假网络错误(剩余 2 次尝试):发送请求失败:操作超时 ;类别=Os (2) 警告:虚假网络错误(剩余 1 次尝试):发送请求失败:操作超时 ;类别=Os (2) 错误:无法获取 serde 作为包 app v0.1.0 (C:\WINDOWS\System32\tauri-app\src-tauri) 的依赖项

原因: 无法加载依赖 serde 的源

原因: 无法更新注册表 crates-io

原因如下: 无法获取 https://github.com/rust-lang/crates.io-index

原因: 发送请求失败:操作超时 ;类别=Os (2)

C:\WINDOWS\System32\tauri-app>npm run tauri

[email protected] tauri
tauri dev

[tauri:dev] Running yarn dev
yarn run v1.22.17
$ vite
Pre-bundling dependencies:
vue
(this will be run only when your dependencies or config have changed)

vite v2.8.6 dev server running at:

Local: http://localhost:3000/
Network: use --host to expose

ready in 523ms.

Updating crates.io index

warning: spurious network error (2 tries remaining): failed to send request: 操作超时
; class=Os (2)
warning: spurious network error (1 tries remaining): failed to send request: 操作超时
; class=Os (2)
error: failed to get serde as a dependency of package app v0.1.0 (C:\WINDOWS\System32\tauri-app\src-tauri)

Caused by:
failed to load source for dependency serde

Caused by:
Unable to update registry crates-io

Caused by:
failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
failed to send request: 操作超时
; class=Os (2)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

神妖 2025-01-19 18:51:42

由于中国防火墙,安装 Rust 依赖项时网络请求失败。

您可以使用代理或在中国配置cargo镜像

Network request failed when install rust dependency because of Chinese FireWall.

You can use proxy or config cargo mirror in China.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文