4
votes

I haven't used Linux much but I'm trying to run an application which I've packaged using electron-packager.

So while on Linux, I can run npm start and my app works fine. But when I package it, there doesn't seem to be an installer or anything. Packaging and running on Windows work fine.

I packaged using:

npm run package-linux

Edit as requested:

I'm using Linux mint-19.1-cinnamon-64bit.

The package script I used is;

"package-linux": "electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --icon=assets/icons/png/icon.png --prune=true --out=release-builds"

Running the npm run package-linux completes successfully and produces a folder called electron-tutorial-app-linux-x64 in a release-builds folder.

2
It would help if you mentioned which Linux distro & version you're using, what the package-linux script is and exactly what it outputs. - Itai Steinherz
@ItaiSteinherz sorry about that I've included more info. - Physicsman
It would also help if you mentioned what the electron-tutorial-app-linux-x64 folder the script created contains :) - Itai Steinherz
@ItaiSteinherz It's just the code from this video :) youtube.com/watch?v=kN1Czs0m1SU - Physicsman
@ItaiSteinherz here is paste of the main.js code pastebin.com/CfamtKxu - Physicsman

2 Answers

3
votes

Apparently, recent versions of Electron output the packaged app in a "shared library" format on Linux, which the file managers don't recognize as an executable. I found this answer sufficiently explained why this issue occurs and different ways to work around it: https://stackoverflow.com/a/55064060/4774167