Skip to content

Can't package win32 on WSL #1985

Description

@dreisel

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • **Electron Forge Version: **
    • 6.0.0-beta.53
  • 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.

  1. 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.
  2. electron-rcedit added support for wsl so when on WSL it is not using wine and therefor can't access the electron.exe file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions