Introduction

In the following paragraphs you'll learn how we can set up Electron  based app on SDCC   cluster. Electron is  a framework for building desktop applications using JavaScript , HTML , and CSS. Since Electron  embeds Chromium  to run following solution it's recommended to connect to cluster via NoMachine.

Install node.js 

First things first we need to install node.js during session on SDCC  cluster. To do you can take two paths, install node.js  manually (higher flexibility) or load it with module (faster, recommended).

Install node.js  via nvm

In this section you'll learn how to install node.js  manually. It's better solution than using modules in terms of freedom of choice of node.js  version. In order to install node.js  follow steps given bellow. If you don't won't to do that, feel free to move to next section.

  1. Upgrade default version of g++ on SDCC  ( node.js requires at least g++ >= 10.1). In order to do that you can load module with GCCcore, for examle:
    module load GCCcore/13.2.0
  2. After loading module, execute following commands:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    source ~/.nvm/nvm.sh
  3. To view available versions of node.js  you can run:
    nvm ls-remote
  4. execute following command:

    nvm install <node-version>
  5. To verify installation of node.js you can check it's version with following command:
    npm --version

Install node.js  via module

Currently there are a few versions of node.js on SDCC. To view them run:

module avail nodejs

## output
-- /work/imas/etc/modules/all --
nodejs/12.19.0-GCCcore-10.2.0
nodejs/18.12.1-GCCcore-12.2.0
nodejs/20.9.0-GCCcore-13.2.0


In order to load node.js type following command with one of available node.js version:

module load <nodejs>

Install Electron 

After installing node.js  inside your SDCC  environment it's time to set up Electron example project. To do that follow steps given bellow:

  1. Clone repository with Electron sample:
    git clone https://github.com/electron/electron-quick-start
  2. go to Electron  directory
  3. execute following commands:
    npm install
    npm start