Install Electron using homebrew on macOS High Sierra

Install homebrew (

Install node.js v8.9.4

$ brew install node@8 -v
$ echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile

Install Electron

$ npm install -g electron

Check installation

$ electron
  Electron 1.8.2 - Build cross platform desktop apps with JavaScript, HTML, and CSS
  Usage: electron [options] [path]

  A path to an Electron app may be specified. It must be one of the following:
    - index.js file.
    - Folder containing a package.json file.
    - Folder containing an index.js file.
    - .html/.htm file.
    - http://, https://, or file:// URL.

    -d, --default         Run the default bundled Electron app.
    -i, --interactive     Open a REPL to the main process.
    -r, --require         Module to preload (option can be repeated).
    -v, --version         Print the version.
    -a, --abi             Print the Node ABI version.