问题一、electron-builder part download request failed with status code 403
electron-builder打包需要从github上拉取一直文件,但是经常会卡死在这个页面
方案一:命令行翻墙
使用shadowsocks设置全局代理之后,在命令行中输入1
2export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;
# 其他命令...
方案二:下载winCodeSign
、wine
后手动解压到~Library/Caches/electron-builder
1 | # https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.4.0/winCodeSign-2.4.0.7z |
最终目录结构
1 | . |
问题二、wine-home is not owned by you
第一次尝试
1 | electron-builder --win --x64 |
第二次尝试
1 | sudo electron-builder --win --x64 |
第三次尝试,解决问题
添加sudo后当前执行用户是root,所以要给wine-home添加权限
1 | sudo chown -R root ~/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/wine-home |