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

多个问题:

问题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

将下载的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)

image
解决方案:

这里一样,下载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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容