为什么运行命令“npm run tauri”时出错?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于中国防火墙,安装 Rust 依赖项时网络请求失败。
您可以使用代理或在中国配置cargo镜像。
Network request failed when install rust dependency because of Chinese FireWall.
You can use proxy or config cargo mirror in China.