Relative Content

Tag Archive for electronelectron-builder

i am get this error while build my electron-vite project

workingDir=C:UsershpAppDataLocalelectron-builderCachewinCodeSign • Above command failed, retrying 3 more times • downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1 • downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=2m29.064s ⨯ cannot execute cause=exit status 2 out= 7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26 Scanning the drive for archives: 1 file, 5635384 bytes (5504 KiB) Extracting archive: C:UsershpAppDataLocalelectron-builderCachewinCodeSign380855827.7z — Path = […]

Import npm package from extraResources JS file in Electron fails

In my extraResources directory, I have a batch.js file that imports npm packages.
I exec() a child process in the main electron process to run the batch.js file. The command looks like this: exec('node ${process.extraResources}/extra_resources/batch.js').
The batch.js file runs seamlessly in the Development mode, but when I build the app, batch.js file fails to load the npm packages.