Summary of the pits packed and stepped on by electron

Time:2020-1-10

When Vue electronic executes NPM run build, it will time out due to downloading the files needed for remote packaging during build, and then install the corresponding files manually step by step according to the error.
Although I refer to many related methods on the Internet, I failed in the end, and finally succeeded after many attempts.
Attach the relevant Taobao image address of elelctron: https://npm.taobao.org/mirror

  • step1: after NPM run build, you need to download the electronic-v2.0.18-win32-x64.zip for the first error report (here is the file that needs this version, select the corresponding version to download according to your own error information). Select the version number 2.0.18 in the image, click enter, and select downloadelectron-v2.0.18-win32-x64.zipandSHASUMS256.txt, after downloading, change the shasums256.txt file to shasums256.txt-2.0.18, and then copy the two files into the location as shown in the figure:Summary of the pits packed and stepped on by electron
  • step2: after step1 is completed, continue NPM run build, and find another file download failure wincodesign-2.4.0 (I need this version of the file here, choose the corresponding version to download according to my error information), then download https://github.com/electronic-u… Manually, download the source code (zip) here, which is fast, decompress after download, copy as shown in the figure below Location all files:
    Summary of the pits packed and stepped on by electron
    Copy to the following location:
    Summary of the pits packed and stepped on by electron
  • step3: after step 2 is completed, continue NPM run build. It is found that there is another file download failure nsis-3.0.3.2 (the same as above). Then download https://github.com/electronic-u.. The same as above. After downloading, extract the file and copy all the files as shown in the figure:Summary of the pits packed and stepped on by electron
    Copy to the following location:
    Summary of the pits packed and stepped on by electron
  • step4: after step 3 is completed, continue NPM run build. It is found that there is another file download failure nsis-resources-3.3.0. But according to the above method, an error will be reported finally. Then I try,Try downloading and decompressing the version of nsis-3.0.3.2 from Step3, copy all files as shown in the figure:
    Summary of the pits packed and stepped on by electron
    Copy to the following location:
    Summary of the pits packed and stepped on by electron

So far, we have carried out four copy operations in total. After the above four operations, run NPM run build, and it will be packaged successfully in a short time, and your first exe version will be obtained.

Recommended Today

Deeply analyze the principle and practice of RSA key

1、 Preface After experiencing many dark moments in life, when you read this article, you will regret and even be angry: why didn’t you write this article earlier?! Your darkest moments include: 1. Your project needs to be connected with the bank, and the other party needs you to provide an encryption certificate. You have […]