Patrick Voorhoeve
Patrick Voorhoeve

Reputation: 61

Electron-Packager not doing anything

So I'm trying to package an electron app using electron-packager. I have followed all the tutorials and have come up with using the following code and then running it in CMD using npm run package-win. When I do this however, nothing happens. It runs the command then hangs here. I have also tried packaging the default electron-forge application. This gets stuck in what I assume is the same place on;

√ Checking your system
| Preparing to Package Application for arch: x64 

What do I have to change to make this work?

{
  "name": "exerunning",
  "version": "1.0.0",
  "description": "",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "package-win": "electron-packager . electron-serialport --overwrite --asar --platform=win32 --arch=ia32 --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"CryptoApp\""
  },
  "author": "Patrick Voorhoeve",
  "license": "ISC",
  "devDependencies": {
    "electron": "^11.1.0",
    "electron-packager": "^15.2.0"
  }
}

Upvotes: 4

Views: 2155

Answers (2)

You should have this in your package.json:

"start:electron": "ng build --base-href ./ && electron ."

Then run it; it will update your application status.

After that, run the package command:

npm run package

Upvotes: 1

Chandru
Chandru

Reputation: 29

Before trying to run the electron packager command, first, run the command SET DEBUG=* and then run npm run package-win command. It will display the logs in the terminal. There you can find the reason for getting stuck.

I also have faced this issue and found the reason for getting stuck using set debug command.

Upvotes: 0

Related Questions