0
votes

I am getting the below error while making deb file of electronjs

  Error: could not find the Electron app binary at "dist/app-linux-x64/koriwallet". You may need to re-bundle the app using Electron Packager's "executableName" option.

My package.json file is { "name": "wallet", "version": "1.0.0", "description": "wallet", "main": "src/main.js", "scripts": { "start": "electron .", "build": "electron-packager . myapp", "pack": "electron-builder --dir", "dist": "electron-builder", "deb64": "electron-installer-debian --src dist/app-linux-x64/ --dest dist/installers/ --arch amd64" }, "author": "wallet", "license": "ISC", "devDependencies": { "asar": "^2.0.1", "electron": "^5.0.6", "electron-builder": "^21.1.1", "electron-installer-debian": "^2.0.0", "electron-packager": "^14.0.2" }, "electronPackagerConfig": { "packageManager": "npm", "executableName": "kori" }, "build": { "appId": "wallet", "linux": { "category": "wallet" } }, "dependencies": { "cookies": "^0.7.3", "crypto": "^1.0.1", "dpkg": "^1.0.0", "jquery": "^3.4.1", "jstorage": "^0.4.8" } }

2

2 Answers

1
votes

My 2 cents. I'm making an Fedora 30 rpm and got:

An unhandled error has occurred inside Forge: An error occured while making for target: rpm could not find the Electron app binary at "/home/ajm/Documents/Projects/sunstealer.ets/out/sunstealer.ets product-linux-x64/sunstealer.ets". You may need to re-bundle the app using Electron Packager's "executableName" option. Error: could not find the Electron app binary at "/home/ajm/Documents/Projects/sunstealer.ets/out/sunstealer.ets product-linux-x64/sunstealer.ets". You may need to re-bundle the app using Electron Packager's "executableName" option. at error.wrapError (/home/ajm/Documents/Projects/sunstealer.ets/node_modules/electron-installer-common/src/installer.js:145:15)

Fix was update package.json from

"name": "sunstealer.ets", "productName": "sunstealer.ets product",

to:

"name": "sunstealer.ets", "productName": "sunstealer.ets",

i.e. same value. Then npm run make with:

"forge": {
  "packagerConfig": {},
  "makers": [
    {
      "name": "@electron-forge/maker-squirrel",
      "config": {
        "certificateFile": "./certs/adam_mauger.pfx",
        "certificatePassword": "REDACTED"
      }
    },
    {
      "name": "@electron-forge/maker-dmg",
      "config": {
        "format": "ULFO"
      }
    },
    {
      "name": "@electron-forge/maker-rpm",
      "config": {
      }
    },

created sunstealer.ets-1.0.0-1.x86_64.rpm. Hope that helps.

0
votes

my 5 cents) so, launch npm from root folder. there exist node_modules. app stored in root/src. there exist node_modules. and in root and in root/src have package.json check root/src/package.json file. maybe there parameter "name" have default value in lowercase