美文网首页
Tauri初次打包npm run tauri build报错处理

Tauri初次打包npm run tauri build报错处理

作者: callPromise | 来源:发表于2023-09-21 14:21 被阅读0次

多个问题:

问题1.

Error You must change the bundle identifier in tauri.conf.json > tauri > bundle > identifier. The default value com.tauri.dev is not allowed as it must be unique across applications.

解决方案:

修改tauri.conf.json中tauri > bundle > identifier为com.tauri.build

问题2.

打包显示一直在Updating git repository https://github.com/tauri-apps/tauri...
这个是因为国外镜像慢,

解决方案:

直接下载https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip,在系统盘C盘找到(没有就创建C:\Users[用户]\AppData\Local\Tauri\WixTools)

image.png
将下载的wix311-binaries解压到WixTools文件夹中
问题3.

Error failed to bundle project: “https://github.com/tauri-apps/binary-releases/releases/download/nsis-3/nsis-3.zip: Network Error: Network Error:
Error encountered in the status line: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。(os error 10069)

nsisError.jpg
解决方案:

这里一样,下载https://ghproxy.com/https://github.com/tauri-apps/binary-releases/releases/download/nsis-3/nsis-3.zip,然后解压到C:\Users[用户]\AppData\Local\Tauri\WixTools下的nsis文件夹里

问题4.

Error failed to bundle project: https://github.com/tauri-apps/binary-releases/releases/download/nsis-plugins-v0/NSIS-ApplicationID.zip: Connection Failed: Connect error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 (os error 10060)

解决方案:

下载https://github.com/tauri-apps/binary-releases/releases/download/nsis-plugins-v0/NSIS-ApplicationID.zip后解压到C:\Users[用户]\AppData\Local\Tauri\WixTools\nsis\nsis-3.08\plugins文件夹里,NSIS-ApplicationID\ReleaseUnicode中的ApplicationID.dll和ApplicationID.pdb两个文件复制到C:\Users[用户]\AppData\Local\Tauri\WixTools\nsis\nsis-3.08\Plugins\x86-unicode文件夹下
至此,npm run tauri build打包应该就不会再有问题了

image.png image.png

相关文章

网友评论

      本文标题:Tauri初次打包npm run tauri build报错处理

      本文链接:https://www.haomeiwen.com/subject/jxwzbrtx.html