Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building for platform win32 on macOS with ARM64 fails #2683

Open
3 tasks done
clstaudt opened this issue Jan 14, 2022 · 5 comments
Open
3 tasks done

Building for platform win32 on macOS with ARM64 fails #2683

clstaudt opened this issue Jan 14, 2022 · 5 comments

Comments

@clstaudt
Copy link

Pre-flight checklist

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

Electron Forge version

6.0.0-beta.63

Electron version

v16.0.7

Operating system

macOS 11.6.2

Last known working Electron Forge version

No response

Expected behavior

Application for platform win32 should build.

Actual behavior

>   npx electron-forge make --arch=x64 --platform=win32
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: squirrel
✖ Making for target: squirrel - On platform: win32 - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
spawn mono ENOENT
Error: spawn mono ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:475:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Steps to reproduce

  1. start from electron-forge template on macOS (ARM64)
  2. attempt to build for platform win32 and arch x86.

Additional information

No response

@clstaudt clstaudt added the bug label Jan 14, 2022
@iviaks
Copy link

iviaks commented Jan 24, 2022

Hey
This issue appears inside electron-winstaller
electron/windows-installer#386

I had the same issue but it's fixable manually.

  1. Open ./node_modules/electron-winstaller/vendor
  2. Copy 7z-x64.* files as 7z.* (fe, 7z-x64.exe => 7z.exe)
  3. Try to build it again

@alusnickic
Copy link

alusnickic commented Mar 14, 2022

If you want to build a windows app on Mac or Linux OS, you need to install wine and mono. In your case, the mono is missing.

@hiukky
Copy link

hiukky commented Mar 18, 2022

Same problem building on Windows 11.

@JakeSidSmith
Copy link

I was running into this same issue on MacOS Monterey 12.3.1 on my MacBook Air (M1, 2020).

After installing mono I get past the above mentioned errors, but it seems to hang on:

Making for target: squirrel - On platform: win32 - For arch: x64

Electron version: 16.2.8
Electron force version: 6.0.0-beta.64

It's been running for 15 minutes now with no changes... gave up and switched to electron-builder which just seems to work without installing anything extra.

@Suthiphong
Copy link

Hey This issue appears inside electron-winstaller electron/windows-installer#386

I had the same issue but it's fixable manually.

  1. Open ./node_modules/electron-winstaller/vendor
  2. Copy 7z-x64.* files as 7z.* (fe, 7z-x64.exe => 7z.exe)
  3. Try to build it again

work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants