美文网首页
electron electron-builder 打包网络问

electron electron-builder 打包网络问

作者: Mr包 | 来源:发表于2023-02-23 15:21 被阅读0次

    如果用 npm指令打包
    //如果用 npm指令打包 将 Electron 镜像源设置为淘宝镜像源
    npm config set ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
    //将 Electron-builder 镜像源设置为淘宝镜像源
    npm config set ELECTRON_BUILDER_BINARIES_MIRROR=http://npm.taobao.org/mirrors/electron-builder-binaries/

    如果用 cnpm指令打包
    //如果用 npm指令打包 将 electron 依赖镜像源设置为淘宝镜像源
    cnpm config set ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
    //将 electron-builder 依赖镜像源设置为淘宝镜像源
    cnpm config set ELECTRON_BUILDER_BINARIES_MIRROR=http://npm.taobao.org/mirrors/electron-builder-binaries/

    淘宝镜像无法下载 winCodeSign依赖
    报错如下

    > build --win --ia32
    
      • electron-builder version=20.44.4
      • loaded configuration file=package.json ("build" field)
      • writing effective config file=dist/builder-effective-config.yaml
      • no native production dependencies
      • packaging       platform=win32 arch=ia32 electron=5.0.13 appOutDir=dist/win-ia32-unpacked
      ⨯ Get https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.4.0/winCodeSign-2.4.0.7z: dial tcp 20.205.243.166:443: connect: connection timed out
    github.com/develar/app-builder/pkg/download.(*Downloader).follow.func1
    

    手动下载该文件
    Windows 系统 C:\Users\你的用户名字\AppData\Local\electron-builder\Cache\winCodeSign

    相关文章

      网友评论

          本文标题:electron electron-builder 打包网络问

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