electron-node-red icon indicating copy to clipboard operation
electron-node-red copied to clipboard

Generating an executable for my Electron Node-Red Application

Open cdriouech opened this issue 4 years ago • 4 comments

Hello,

My goal is to generate an executable for my Electron Node-red Application, I am able to run the application locally using "npm install && npm start" only, please find below the steps that I used :

# Clone this repository

git clone https://github.com/natcl/electron-node-red.git # Go into the repository cd electron-node-red

#merged my flows and package file

./merger.js {used my path to my Node-RED project directory}

**then I tried to run it locally with success with commands yarn:

yarn yarn start In order to build an executable I used electron packager that I installed:

electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build --overwrite Packaging app for platform linux x64 using electron v10.1.7 Wrote new app to build/Node-RED-linux-x64

yarn && yarn dist -l #failed error: ⨯ /home/engr/electron-node-red/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace= AND error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

I was hoping if you can please help me on this.

Thanks in advance !

cdriouech avatar Feb 23 '21 23:02 cdriouech

if you are already on linux then maybe just try yarn dist as it will default to the local type. Apart from that I'm afraid you will need to work out why electron builder isn't running (I use electron builder not electron packager so they may be conflicting or maybe it's not installed)

dceejay avatar Feb 24 '21 08:02 dceejay

I finally got it work, I was missing rpm so I installed it "sudo apt-get install rpm" and then ran the command "yarn && yarn dist".

Thanks!

cdriouech avatar Feb 24 '21 17:02 cdriouech

I have gotten an error while launching my electron node-red application, this is the error in screenshot:

Screenshot from 2021-02-26 11-49-11

Thanks again!

cdriouech avatar Feb 26 '21 17:02 cdriouech

looks like the serialport hasn't compiled it's bindings correctly for electron on ubuntu. I'm afraid you will have to google for that.

dceejay avatar Feb 27 '21 09:02 dceejay