Ubuntu18 PCへのElectron環境インストール手順とサンプルアプリの実行方法をまとめています。
Electron環境構築
Node.js等の必要なパッケージ類をインストールします。
$ sudo apt install nodejs
$ sudo apt install npm
$ sudo apt install libappindicator1
Electron本体(中身はChromium + Node.jsライブラリ群)はグローバルな環境にパスを通してインストールしておきます。
$ sudo npm install electron -g
サンプル実行
Quick start Electron demo app
よく出てくるElectronのクイックスタートサンプルです。
$ git clone https://github.com/electron/electron-quick-start
$ cd electron-quick-start
$ npm install
$ npm start
YouTube Music Desktop App
YouTube Musicのデスクトップアプリです。よく出来ています。
$ git clone https://github.com/adlerluiz/ytmdesktop
$ cd ytmdesktop
$ npm install
$ npm start