Electron is a free framework that allows devs to write code once using common web technologies(HTML, JavaS, CSS), then distribute it to all platforms. From here, pseudo-native applications arise, all of which uses electron. This software handles all the hard work for you when installing an electron dependent app such as rambox. Recently while trying to install Rambox using command prompt on Windows system, I got the error, (electron) 'getName function' is deprecated and will be removed. Please use 'name property' instead. Was confused on what was going on and thus the need for a solution. Install and set up electron.

Install Electron on Windows

Follow the guide below on installing and setting up electron and in case you need an electron app in your Windows system, you will not get the same error, ((electron) 'getName function' is deprecated and will be removed. Please use 'name property' instead.

Step 1. Install Nodejs

To install nodejs, we will be using scoop which is a command line installer for Windows. If you do not have scoop, you can follow the steps on how to install it on the link provided above. Open PowerShell, then use the scoop search command to check if nodejs is available in the list of apps you can install using scoop. Once you install nodejs, npm will also be installed, then you can use it to install electron. Node Package Manager(NPM), is a tool that installs, updates or uninstalls Node. js packages in your application.

    nero-aac (1.5.4.0)
    netcat (1.12)
    nextdns (1.11.0)
    nginx (1.19.8)
    ngrok (2.3.35)
    nim (1.4.4)
    ninja (1.10.2)
    nircmd (2.86)
    nmap-portable (7.91)
    nmap (7.91)
    node-chakracore (10.13.0)
    nodejs-lts (14.16.0)
    nodejs (15.12.0)
    nomad (1.0.4)
    noti (3.5.0)
    nssm (2.24-103)
  • Since nodejs is available, lets install it. Use scoop install nodejs command to install it.
PS C:\Users\Valentine> scoop install nodejs
Scoop uses Git to update itself. Run 'scoop install git' and try again.
Installing '7zip' (19.00) [64bit]
7z1900-x64.msi (1.7 MB) [=====================================================================================] 100%
Checking hash of 7z1900-x64.msi ... ok.
Extracting 7z1900-x64.msi ... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\19.00
Creating shim for '7z'.
Creating shortcut for 7-Zip (7zFM.exe)
'7zip' (19.00) was installed successfully!
Installing 'nodejs' (15.12.0) [64bit]
node-v15.12.0-win-x64.7z (16.3 MB) [==========================================================================] 100%
Checking hash of node-v15.12.0-win-x64.7z ... ok.
Extracting node-v15.12.0-win-x64.7z ... done.
Linking ~\scoop\apps\nodejs\current => ~\scoop\apps\nodejs\15.12.0
Persisting bin
Persisting cache
Running post-install script...
'nodejs' (15.12.0) was installed successfully!
  • To check whether nodejs and npm have been installed successfully, use node -v and npm -v commands respectively from the command prompt.

Just likes as shown;

C:\Users\Valentine>node -v
v15.12.0

C:\Users\Valentine>npm -v
npm notice
npm notice New minor version of npm available! 7.6.3 -> 7.7.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.7.0
npm notice Run npm install -g [email protected] to update!
npm notice
7.6.3

C:\Users\Valentine>

C:\Users\Valentine>

C:\Users\Valentine>npm install -g [email protected] to update
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated [email protected]: Critical bug fixed in v3.0.1, please upgrade to the latest version.

added 642 packages, and audited 675 packages in 2m

8 packages are looking for funding
  run `npm fund` for details

52 vulnerabilities (15 low, 1 moderate, 36 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

C:\Users\Valentine>npm-v
'npm-v' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Valentine>node -v
v15.12.0

C:\Users\Valentine>npm -v
7.7.0

Step 2. Install Electron

To install electron, we use npm. Go to command prompt then type the command;

npm i electron -g

Just like as shown below;

C:\Users\Valentine>npm i electron -g

added 87 packages, and audited 88 packages in 6m

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

C:\Users\Valentine>
C:\Users\Valentine>
C:\Users\Valentine>
C:\Users\Valentine>
C:\Users\Valentine>electron -v

v12.0.2
  • To check if electron was successfully installed on your system,

use electron -v command.

Conclusion

The process of installing electron on your system is quite easy, you just have to follow a few commands as shown above and you are good to go.

Other Posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here