Preflight Checklist
Issue Details
- **Electron Forge Version: **
- Electron Version:
- Operating System:
- Last Known Working Electron Forge version::
Expected Behavior
yarn package -- --platform win32
Actual Behavior
`➜ yarn package -- --platform win32
yarn run v1.22.4
warning package.json: License should be a valid SPDX license expression
warning ../../../../package.json: No license field
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ electron-forge package --platform win32
✔ Checking your system
✔ Compiling Main Process Code
✔ Compiling Renderer Template
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
⠋ Packaging Application
An unhandled rejection has occurred inside Forge:
Error: rcedit.exe failed with exit code 1. Unable to load file: "/tmp/electron-packager/win32-x64/electron-win32-x64/electron.exe"
at ChildProcess. (/c/Users/daniel/dev/ui/node_modules/rcedit/lib/rcedit.js:71:16)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1021:16)
at Socket. (internal/child_process.js:443:11)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at Pipe. (net.js:674:12)
Electron Forge was terminated. Location:
{}
error Command failed with exit code 1.`
To Reproduce
yarn package --platform win32
Additional Information
So after a short investigation, the issue is a combination of 2 things.
- the build is stored in a temp dir, located in /tmp/XXX this is the linux machine temp directory and its inaccessible for the windows process.
- electron-rcedit added support for wsl so when on WSL it is not using wine and therefor can't access the electron.exe file.
Preflight Checklist
Issue Details
Expected Behavior
yarn package -- --platform win32
Actual Behavior
`➜ yarn package -- --platform win32
yarn run v1.22.4
warning package.json: License should be a valid SPDX license expression
warning ../../../../package.json: No license field
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ electron-forge package --platform win32
✔ Checking your system
✔ Compiling Main Process Code
✔ Compiling Renderer Template
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
⠋ Packaging Application
An unhandled rejection has occurred inside Forge:
Error: rcedit.exe failed with exit code 1. Unable to load file: "/tmp/electron-packager/win32-x64/electron-win32-x64/electron.exe"
at ChildProcess. (/c/Users/daniel/dev/ui/node_modules/rcedit/lib/rcedit.js:71:16)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1021:16)
at Socket. (internal/child_process.js:443:11)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at Pipe. (net.js:674:12)
Electron Forge was terminated. Location:
{}
error Command failed with exit code 1.`
To Reproduce
yarn package --platform win32
Additional Information
So after a short investigation, the issue is a combination of 2 things.