Electron-forge: Building on OSX for win32 throws an "Unknown Error -86"

Created on 30 Aug 2019  路  8Comments  路  Source: electron-userland/electron-forge

Hey, I'm trying to build my app for my colleagues. They are using windows, though I keep getting the following error:

An unhandled rejection has occurred inside Forge:
Error: spawn Unknown system error -86
    at ChildProcess.spawn (internal/child_process.js:394:11)
    at spawn (child_process.js:540:9)
    at /usr/local/lib/node_modules/@electron-forge/cli/node_modules/rcedit/lib/rcedit.js:44:19
    at new Promise (<anonymous>)
    at module.exports (/usr/local/lib/node_modules/@electron-forge/cli/node_modules/rcedit/lib/rcedit.js:43:10)
    at WindowsApp.runRcedit (/usr/local/lib/node_modules/@electron-forge/cli/node_modules/electron-packager/src/win32.js:94:31)
    at WindowsApp.create (/usr/local/lib/node_modules/@electron-forge/cli/node_modules/electron-packager/src/win32.js:106:5)
    at async Promise.all (index 0)
    at packager (/usr/local/lib/node_modules/@electron-forge/cli/node_modules/electron-packager/src/index.js:165:20)
    at _default (/usr/local/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/api/package.ts:206:3)
    at _default (/usr/local/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/api/make.ts:141:5)
    at /usr/local/lib/node_modules/@electron-forge/cli/src/electron-forge-make.ts:41:5 {
  errno: 'Unknown system error -86',
  code: 'Unknown system error -86',
  syscall: 'spawn'
}

Electron Forge was terminated. Location:
{}

Here's my configuration.

config": {
    "forge": {
      "packagerConfig": {},
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "lumifish_admin"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-deb",
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "config": {}
        }
      ],
      "plugins": [
        [
          "@electron-forge/plugin-webpack",
          {
            "mainConfig": "./webpack.main.config.js",
            "renderer": {
              "config": "./webpack.renderer.config.js",
              "entryPoints": [
                {
                  "html": "./src/views/main/index.html",
                  "js": "./src/views/main/index.ts",
                  "name": "main_window"
                },
                {
                  "html": "./src/views/loading/index.html",
                  "js": "./src/views/loading/index.ts",
                  "name": "loading_window"
                },
                {
                  "html": "./src/views/login/index.html",
                  "js": "./src/views/login/index.ts",
                  "name": "login_window",
                  "ignore": []
                }
              ]
            }
          }
        ]
      ]
    }
  }

The command:

electron-forge make --platform="win32"

I also really have no idea what I'm doing.

Most helpful comment

After looking further into this, there is not solution for this for MacOS Catalina. Pretty sad that Apple went and did a stupid thing with the 64bit only. Dang, well, I guess I'll have to go and build apps locally on everyone's computers.

All 8 comments

Looks more like a wine issue. When I try to run wine I get the following error: bad CPU type in executable: wine

Will keep digging around.

Ok, I found the issue.

I'm running MacOS Catalina, and it's not set to run 32bit software. Wine is 32bit, thus cannot be run. What a load of crap from Apple.

Anyone ran into a similar issue? Any alternatives?

After looking further into this, there is not solution for this for MacOS Catalina. Pretty sad that Apple went and did a stupid thing with the 64bit only. Dang, well, I guess I'll have to go and build apps locally on everyone's computers.

Ah experiencing a similar issue

I have the same issue juste after updating to Catalina..
Did anyone find a solution ?
Thanks

Upgrade Forge to latest v6 and make sure you've installed wine-stable from Homebrew, which should install wine64.

Thank you very much !
With the wine64 and this post https://github.com/electron/node-rcedit/issues/51#issuecomment-546234084 I was able to build my app for windows.

I just found another post that solves this problem. It worked for me. Can not build the windows installer on macOS Catalina version 10.15 #4305 (comment)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Skizu picture Skizu  路  5Comments

damianesteban picture damianesteban  路  3Comments

chenzhiguo picture chenzhiguo  路  5Comments

denn-s picture denn-s  路  3Comments

pkinnucan picture pkinnucan  路  4Comments