About solving the timeout problem of downloading NSIS wincodesign during packaging of electron builder

Time:2021-7-28

These two dayselectron-builder; It’s really abused. I can only rely on Google to read the documents
Let’s move on to the topic

Timeout problem

 • electron-builder  version=22.9.1 os=10.0.19042
  • description is missed in the package.json  appPackageFile=G:\_personal\lasa-project-client\dist_electron\bundled\package.json
  • author is missed in the package.json  appPackageFile=G:\_personal\lasa-project-client\dist_electron\bundled\package.json     
  • writing effective config  file=dist_electron\builder-effective-config.yaml
  • rebuilding native dependencies  [email protected] platform=win32 arch=x64
  • rebuilding native dependency  name=sqlite3 version=5.0.0
  • packaging       platform=win32 arch=x64 electron=9.3.3 appOutDir=dist_electron\win-unpacked
  • default Electron icon is used  reason=application icon is not set
  ⨯ Get "https://github-releases.githubusercontent.com/65527128/f73f2200-5d53-11ea-8264-ddd345f11ee4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210716%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210716T015308Z&X-Amz-Expires=300&X-Amz-Signature=d1a508b2e0e7ed18229f10842c8a3cc105b83307d3e6750b81622f0713a91dab&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=65527128&response-content-disposition=attachment%3B%20filename%3DwinCodeSign-2.6.0.7z&response-content-type=application%2Foctet-stream": read tcp 172.17.7.151:64211->185.199.111.154:443: wsarecv: An existing connection was forcibly closed by the remote host.

About solving the timeout problem of downloading NSIS wincodesign during packaging of electron builder
This is an error reported by the console, and the corresponding folder is really out of stock. It looks like downloadingwinCodeSignThis thing timed out and reported an error. I thought, didn’t I open an agent? How can I report an error? So I began to fill in the pit

Plana – Manual Download

After turning to the search engine, I found that it was becausewinCodeSignandnsisThese two goods can’t be downloaded correctly
C:\Users\zhangsan\AppData\Local\electron-builder\CacheUnder this folder. Therefore, it was downloaded manually. Refer tohereBut I don’t want to download it manually. I’m afraid that the version doesn’t match. I tossed about in vain, so I searched hard and found PlanB

PlanB settings. Npmrc automatic download

as everyone knows,.npmrcYou can set the dependent image address, or you can link to your private address to rely on the image. So goTaobao imageSearch. Found this thing
About solving the timeout problem of downloading NSIS wincodesign during packaging of electron builder

It seems to be aboutelectron-builderYesbinariesJustcopyCome and try

  1. Step 1: create in the root directory.npmrcFile. Then copy in

    ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
    ELECTRON_BUILDER_BINARIES_MIRROR=http://npm.taobao.org/mirrors/electron-builder-binaries/

    About solving the timeout problem of downloading NSIS wincodesign during packaging of electron builder

  2. tryvue-cli-service electron:buildinstructions
    The world was quiet in an instant. There was no pit father’s overtime anymore
    About solving the timeout problem of downloading NSIS wincodesign during packaging of electron builder
    Now look at the previous folder. Is there a fish coming in
    About solving the timeout problem of downloading NSIS wincodesign during packaging of electron builder

Bingo!