BySlin / umi-plugin-electron-builder

umi的electron插件
MIT License
157 stars 25 forks source link

cannot unpack electron zip file, will be re-downloaded error=zip: not a valid zip file #58

Closed pxim closed 2 years ago

pxim commented 2 years ago

image

package.json image

BySlin commented 2 years ago

用华为镜像试试 yarn config set electron_mirror https://mirrors.huaweicloud.com/electron/

pxim commented 2 years ago

用华为镜像试试 yarn config set electron_mirror https://mirrors.huaweicloud.com/electron/

image image 还是不行,我用浏览器点击 https://npm.taobao.org/mirrors/electron/17.1.2/electron-v17.1.2-win32-x64.zip 这个链接是可以下载的

我用了这个命令,为什么 运行 electron:build:win,还是下载的淘宝链接

pxim commented 2 years ago

我手动下载下来这个electron包,放到对应的目录下可以么? 就是我目前不知道把这个 electron.zip 放在哪里

BySlin commented 2 years ago

@pxim C:\Users\用户目录\AppData\Local\electron\Cache

pxim commented 2 years ago

@pxim C:\Users\用户目录\AppData\Local\electron\Cache

image

这个目录下,有这个zip文件,不知道为什么还有 ⨯ zip: not a valid zip file 这个错误

BySlin commented 2 years ago

@pxim 你看这个压缩包你能手动解压不,看是不是压缩包损坏

pxim commented 2 years ago

@pxim 你看这个压缩包你能手动解压不,看是不是压缩包损坏

确实是损坏了,解压不了,我替换了,现在可以build通过了,谢谢 image