Electron-builder: Error downloading electron-builder required tools files

Created on 25 Jul 2017  ยท  19Comments  ยท  Source: electron-userland/electron-builder


  • Version: 19.12.0


For some reason, the building process could not download winCodeSign, nsis-resources and other files automatically, always get timeout errors(maybe blocked by some wall). Could I just download the electron-builder-binaries zip from github or some other sites and extract to a specific folder so i can skip the download process when building my app? Thx

question

Most helpful comment

macOS: ~/Library/Caches/electron-builder
Linux: ~/.cache/electron-builder
windows: %LOCALAPPDATA%\electron-builder\cache

All 19 comments

Unpack using 7z to cache dir.

Many thanks for prompt reply.

where are these tool files should be put in ??

macOS: ~/Library/Caches/electron-builder
Linux: ~/.cache/electron-builder
windows: %LOCALAPPDATA%\electron-builder\cache

.
โ”œโ”€โ”€ AppImage
โ”‚ย ย  โ””โ”€โ”€ AppImage-17-06-17-mac
โ”œโ”€โ”€ AppImage-packages
โ”‚ย ย  โ””โ”€โ”€ 10.03.17
โ”œโ”€โ”€ Squirrel.Windows
โ”‚ย ย  โ””โ”€โ”€ Squirrel.Windows-1.6.0.0
โ”œโ”€โ”€ fpm
โ”‚ย ย  โ””โ”€โ”€ fpm-1.8.1-20150715-2.2.2
โ”œโ”€โ”€ linux-tools
โ”‚ย ย  โ””โ”€โ”€ linux-tools-mac-10.12
โ”œโ”€โ”€ nsis
โ”‚ย ย  โ””โ”€โ”€ nsis-3.0.1.13
โ”œโ”€โ”€ nsis-resources
โ”‚ย ย  โ””โ”€โ”€ nsis-resources-3.1.0
โ”œโ”€โ”€ winCodeSign
โ”‚ย ย  โ””โ”€โ”€ winCodeSign-1.9.0
โ””โ”€โ”€ wine
    โ””โ”€โ”€ wine-2.0.1-mac-10.12

thx๏ผ๏ผ๏ผ

Hi,

I also face a similar problem.
I downloaded all dependencies from https://drive.google.com/uc?export=download&id=0Bz3JwZ-jqfROc1FNT25FeTVoRWM

keep that in my project/resources folder.
when I try to create and cache/electron-builder and cp to it I am getting following error

Error: ENOENT: no such file or directory, stat '/Users/develar/Desktop'
How to fix this error

Thanks
Jk

mark & thx!

@develar Could you please explain this question in detail?

where are these tool files should be put in ??

I use windows, and the files unzipped from the winCodeSign-2.4.0 which I downloaded manually are below:

_20190201174951

And in %LOCALAPPDATA%\electron-builder\cache, there's a winCodeSign directory, which files should I put into the winCodeSign directory?

And after put the right thing to winCodeSign directory, when I run npm run builder, will electron-builder still download the winCodeSign automatically?

@SaromChars ๆ–ฐๅนดๅฅฝ๏ผ่ƒฝๅ‘Š่ฏ‰ๆˆ‘ๆ€Žไนˆ่งฃๅ†ณ่ฟ™ไธช้—ฎ้ข˜ไนˆ๏ผŸๆˆ‘็š„ๅพฎไฟก๏ผšvm140706

Can you change these files to another storage location?Current storage locations are painful for Chinese developers

In China , simply use command ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ npm run dist

Zip file (92MB) to extract instead of tedios downloading: https://drive.google.com/uc?export=download&id=0Bz3JwZ-jqfROc1FNT25FeTVoRWM

Or 7z archive (40MB) https://drive.google.com/uc?export=download&id=0Bz3JwZ-jqfRORjZTa3FPWUpJT0E

this file isn't available anymore. how can I get it?
and how to skip the download stage and read from the cache?
thanx for the great efforts

.
โ”œโ”€โ”€ AppImage
โ”‚ย ย  โ””โ”€โ”€ AppImage-17-06-17-mac
โ”œโ”€โ”€ AppImage-packages
โ”‚ย ย  โ””โ”€โ”€ 10.03.17
โ”œโ”€โ”€ Squirrel.Windows
โ”‚ย ย  โ””โ”€โ”€ Squirrel.Windows-1.6.0.0
โ”œโ”€โ”€ fpm
โ”‚ย ย  โ””โ”€โ”€ fpm-1.8.1-20150715-2.2.2
โ”œโ”€โ”€ linux-tools
โ”‚ย ย  โ””โ”€โ”€ linux-tools-mac-10.12
โ”œโ”€โ”€ nsis
โ”‚ย ย  โ””โ”€โ”€ nsis-3.0.1.13
โ”œโ”€โ”€ nsis-resources
โ”‚ย ย  โ””โ”€โ”€ nsis-resources-3.1.0
โ”œโ”€โ”€ winCodeSign
โ”‚ย ย  โ””โ”€โ”€ winCodeSign-1.9.0
โ””โ”€โ”€ wine
    โ””โ”€โ”€ wine-2.0.1-mac-10.12

nsis-resources now reside under nsis

nsis-resources-3.4.1.7z always downloading even after manually downloaded and inserted into "%LOCALAPPDATA%\electron-builder\cache"

electron-builder build --win -c.extraMetadata.main=build/electron.js --publish never

โ€ข electron-builder version=22.9.1 os=10.0.18363
โ€ข loaded configuration file=package.json ("build" field)
โ€ข loaded parent configuration preset=react-cra
โ€ข description is missed in the package.json appPackageFile=C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\client\package.json
โ€ข writing effective config file=dist\builder-effective-config.yaml
โ€ข packaging platform=win32 arch=x64 electron=10.1.3 appOutDir=dist\win-unpacked
โ€ข default Electron icon is used reason=application icon is not set
โ€ข building target=nsis file=dist\test Setup 0.1.0.exe archs=x64 oneClick=true perMachine=false
โจฏ Get "https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z": proxyconnect tcp: dial tcp :0: connectex: The requested address is not valid in its context.
github.com/develar/app-builder/pkg/download.(Downloader).follow.func1
Y:/Documents/app-builder/pkg/download/downloader.go:206
github.com/develar/app-builder/pkg/download.(
Downloader).follow
Y:/Documents/app-builder/pkg/download/downloader.go:234
github.com/develar/app-builder/pkg/download.(Downloader).DownloadNoRetry
Y:/Documents/app-builder/pkg/download/downloader.go:128
github.com/develar/app-builder/pkg/download.(
Downloader).Download
Y:/Documents/app-builder/pkg/download/downloader.go:112
github.com/develar/app-builder/pkg/download.DownloadArtifact
Y:/Documents/app-builder/pkg/download/artifactDownloader.go:107
github.com/develar/app-builder/pkg/download.ConfigureArtifactCommand.func1
Y:/Documents/app-builder/pkg/download/artifactDownloader.go:27
github.com/alecthomas/kingpin.(actionMixin).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/actions.go:28
github.com/alecthomas/kingpin.(
Application).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:557
github.com/alecthomas/kingpin.(Application).execute
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:390
github.com/alecthomas/kingpin.(
Application).Parse
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:222
main.main
Y:/Documents/app-builder/main.go:90
runtime.main
c:/go/src/runtime/proc.go:203
runtime.goexit
c:/go/src/runtime/asm_amd64.s:1373
โจฏ C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\clientnode_modules\app-builder-bin\winx64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=

                         Error: C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\client\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

                             at ChildProcess.<anonymous> (C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\client\node_modules\builder-util\src\util.ts:243:14)

                             at Object.onceWrapper (events.js:421:26)

                             at ChildProcess.emit (events.js:314:20)

                             at maybeClose (internal/child_process.js:1051:16)

                             at Socket.<anonymous> (internal/child_process.js:442:11)

                             at Socket.emit (events.js:314:20)

                             at Pipe.<anonymous> (net.js:673:12)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] electron-pack: electron-builder build --win -c.extraMetadata.main=build/electron.js --publish never
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] electron-pack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Roamingnpm-cache_logs\2020-10-19T05_25_01_242Z-debug.log

nsis-resources-3.4.1.7z always downloading even after manually downloaded and inserted into "%LOCALAPPDATA%\electron-builder\cache"

electron-builder build --win -c.extraMetadata.main=build/electron.js --publish never

โ€ข electron-builder version=22.9.1 os=10.0.18363
โ€ข loaded configuration file=package.json ("build" field)
โ€ข loaded parent configuration preset=react-cra
โ€ข description is missed in the package.json appPackageFile=C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\client\package.json
โ€ข writing effective config file=dist\builder-effective-config.yaml
โ€ข packaging platform=win32 arch=x64 electron=10.1.3 appOutDir=dist\win-unpacked
โ€ข default Electron icon is used reason=application icon is not set
โ€ข building target=nsis file=dist\test Setup 0.1.0.exe archs=x64 oneClick=true perMachine=false
โจฏ Get "https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z": proxyconnect tcp: dial tcp :0: connectex: The requested address is not valid in its context.
github.com/develar/app-builder/pkg/download.(Downloader).follow.func1
Y:/Documents/app-builder/pkg/download/downloader.go:206
github.com/develar/app-builder/pkg/download.(
Downloader).follow
Y:/Documents/app-builder/pkg/download/downloader.go:234
github.com/develar/app-builder/pkg/download.(Downloader).DownloadNoRetry
Y:/Documents/app-builder/pkg/download/downloader.go:128
github.com/develar/app-builder/pkg/download.(
Downloader).Download
Y:/Documents/app-builder/pkg/download/downloader.go:112
github.com/develar/app-builder/pkg/download.DownloadArtifact
Y:/Documents/app-builder/pkg/download/artifactDownloader.go:107
github.com/develar/app-builder/pkg/download.ConfigureArtifactCommand.func1
Y:/Documents/app-builder/pkg/download/artifactDownloader.go:27
github.com/alecthomas/kingpin.(actionMixin).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/actions.go:28
github.com/alecthomas/kingpin.(
Application).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:557
github.com/alecthomas/kingpin.(Application).execute
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:390
github.com/alecthomas/kingpin.(
Application).Parse
C:/Users/develar/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:222
main.main
Y:/Documents/app-builder/main.go:90
runtime.main
c:/go/src/runtime/proc.go:203
runtime.goexit
c:/go/src/runtime/asm_amd64.s:1373
โจฏ C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\clientnode_modules\app-builder-bin\winx64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=

                         Error: C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\client\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

                             at ChildProcess.<anonymous> (C:\Local Disk\Web_Designing_Projects\Practice(Updated)\euro_lights\client\node_modules\builder-util\src\util.ts:243:14)

                             at Object.onceWrapper (events.js:421:26)

                             at ChildProcess.emit (events.js:314:20)

                             at maybeClose (internal/child_process.js:1051:16)

                             at Socket.<anonymous> (internal/child_process.js:442:11)

                             at Socket.emit (events.js:314:20)

                             at Pipe.<anonymous> (net.js:673:12)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] electron-pack: electron-builder build --win -c.extraMetadata.main=build/electron.js --publish never
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] electron-pack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Roamingnpm-cache_logs\2020-10-19T05_25_01_242Z-debug.log

I have solved this issue by

  1. Dont create seperate folder "nsis-resources" in cache directory
  2. Extracted "nsis-resources-3.4.1.7z" folder should be placed inside "nsis" folder inside cache directory
    C:\Usersxxx\AppData\Local\electron-builder\cache
    winCodeSign\winCodeSing-2.6.0
    nsis\nsis-3.0.4.1
    nsis\nsis-resources-3.4.0
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sambego picture Sambego  ยท  64Comments

bontibon picture bontibon  ยท  42Comments

eengoron picture eengoron  ยท  87Comments

probonopd picture probonopd  ยท  55Comments

ticarexbbl picture ticarexbbl  ยท  52Comments