sentialx/electron-global

Not working on Linux

xxczaki opened this issue · 3 comments

Description

After following the Usage section of the README file, I tried running electron-builder --linux --windows, but ended up with error:

Downloading electron-global binaries
Downloading electron-global binaries
[
  [Error: ENOENT: no such file or directory, lstat '/home/akepinski/dev/elcalc/node_modules/electron-global/download/linux/electron'] {
    errno: -2,
    code: 'ENOENT',
    syscall: 'lstat',
    path: '/home/akepinski/dev/elcalc/node_modules/electron-global/download/linux/electron'
  }
]
Done!
  • electron-builder  version=21.2.0 os=4.15.0-54-generic
  • loaded configuration  file=/home/akepinski/dev/elcalc/electron-builder.json
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=6.0.4 appOutDir=dist/linux-unpacked
  • copying Electron  source=/home/akepinski/dev/elcalc/electron-global destination=/home/akepinski/dev/elcalc/dist/linux-unpacked
  ⨯ ENOENT: no such file or directory, rename '/home/akepinski/dev/elcalc/dist/linux-unpacked/electron' -> '/home/akepinski/dev/elcalc/dist/linux-unpacked/elcalc'  stackTrace=Error: ENOENT: no such file or directory, rename '/home/akepinski/dev/elcalc/dist/linux-unpacked/electron' -> '/home/akepinski/dev/elcalc/dist/linux-unpacked/elcalc'

After checking the ./electron-global directory, it only contains the electron_version file, which is empty 😢

Electron Builder configuration

{
  "appId": "me.kepinski.elcalc",
  "files": [
    "app/**/*",
    "package.json"
  ],
  "directories": {
    "buildResources": "resources"
  },
  "electronDist": "./electron-global",
  "mac": {
    "category": "public.app-category.utilities"
  },
  "dmg": {
    "iconSize": 150
  },
  "linux": {
    "target": [
      "AppImage",
      "deb",
      "rpm"
    ],
    "synopsis": "Cross-Platform Calculator",
    "description": "Cross-Platform calculator built with Electron.",
    "category": "Utility;Calculator"
  },
  "publish": null
}

Additional details

  • OS: Linux Mint 19.1 Xfce
  • Node.js version: 12.8.0
  • npm version: 6.10.2
  • electron-builder version: 21.2.0
  • electron-global version: 0.0.1

Thanks for your issue, I will check it on my Ubuntu, but one tip: don't build with electron-builder for all platforms at once (for example: electron-builder --linux --windows), since the electron-global directory only contains binaries for Linux, which means you must run electron-global command before each platform build. For example:

electron-global -l && electron-builder -l
electron-global -w && electron-builder -w

Currently there's no way to overcome this as electron-builder accepts only one electronDist parameter which is platform-independent. The best way to integrate this project better with electron-builder is to get it more popular.

Fixed in v0.0.2