An unhandled rejection has occurred inside Forge: [object Object]

See original GitHub issue

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.3

Electron version

18.3.15

Operating system

macOS Monteray 12.5.1

Last known working Electron Forge version

–

Expected behavior

The “make” works ok.

Actual behavior

Tried to build an electron for windows with the command:

"make:windows": "electron-forge make --platform=win32"

Getting error:

An unhandled rejection has occurred inside Forge: [object Object]

Build for macOS works fine.

Steps to reproduce

Run command:

electron-forge make --platform=win32

forge.config:

module.exports = {
  makers: [
    {
      config: {
        name: 'app-name',
      },
      name: '@electron-forge/maker-squirrel',
    },
    {
      name: '@electron-forge/maker-zip',
      platforms: ['darwin'],
    },
    {
      config: {},
      name: '@electron-forge/maker-deb',
    },
    {
      config: {},
      name: '@electron-forge/maker-rpm',
    },
  ],
  packagerConfig: {},
  rebuildConfig: {},
}

package json:

"@electron-forge/cli": "^6.0.3",
"@electron-forge/maker-deb": "^6.0.3",
"@electron-forge/maker-rpm": "^6.0.3",
"@electron-forge/maker-squirrel": "^6.0.3",
"@electron-forge/maker-zip": "^6.0.3",
"@electron-forge/template-base": "^6.0.3",

Additional information

Console output:

yarn run make:windows
yarn run v1.22.11 $ electron-forge make --platform=win32 ✔ Checking your system ✔ Loading configuration ✔ Resolving make targets › Making for the following targets: squirrel ✔ Running package command ✔ Preparing to package application ✔ Running packaging hooks ✔ Running generateAssets hook ✔ Running prePackage hook ✔ Packaging application ✔ Packaging for x64 on win32 [7s] ✔ Running postPackage hook ✔ Running preMake hook ❯ Making distributables ✖ Making a squirrel distributable for win32/x64 › An error occured while making for target: squirrel ◼ Running postMake hook

An unhandled rejection has occurred inside Forge: [object Object]

Electron Forge was terminated. Location: error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
anatoly-day-iocommented, Nov 18, 2022

Debugged myself by editing node_modules/@electron-forge/cli/dist/util/terminate.js. Was able to build after adding author, description and license fields.

0reactions
erickzhaocommented, Nov 21, 2022

If folks need additional help debugging their specific issues after getting past the [object Object], I would recommend:

  • Joining us at https://discord.gg/electronjs to ask for Forge configuration help.
  • Opening a new issue in the tracker if you think there’s a bug.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron-forge - An unhandled rejection has occurred inside ...
Here [object object] indicates that some values are empty in the package.json file. e.g. in my case it was author and description. Solution...
Read more >
Error: Could not find module with name: @electron-forge ...
An unhandled rejection has occurred inside Forge : Error: Could not find module with name: @electron-forge/maker-squirrel. Make sure it's listed in the ...
Read more >
An unhandled rejection has occurred inside Forge - YouTube
Electron-forge - An unhandled rejection has occurred inside Forge : [ object Object ]I hope you found a solution that worked for you...
Read more >
Electron Forge: Getting Started
Electron Forge is an all-in-one tool for packaging and distributing Electron applications. It combines many single-purpose packages to create a full build ...
Read more >
@electron-forge/cli | Yarn - Package Manager
A complete tool for building modern Electron applications. Electron Forge unifies the existing (and well maintained) build tools for Electron development into a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found