I'm An Idiot and Need Help


I have over 20 years of networking, WAN and other IT technologies and want to become good at programming since I have mastered everything else and am getting bored quite honestly. I want to start to write apps as it seems like a different challenge and something I will enjoy. With that said, I started learning Python until I ran into Electron which seems much better since you can build desktop apps without worrying about all the components (Python, QT, etc).

The problem is that I don’t know where to start. I failed at getting Electron to install on Ubuntu with npm which I hope to figure out soon. Assuming I can get it installed, I don’t even know where to start? Should I learn javascript, HTML5? Is there a beginner’s guide on how to write basic programs in Electron?

Sorry if this sounds so basic but I don’t even know where to begin once I get Electron going. I was able to get the stand alone install working but not the npm global install. Assuming I just use the stand alone for now, can someone tell me where to start? Should I pick up a book and learn javascript and HTML5 or something else?

When reading the Electron website, most of it just goes right over my head as I think it’s written for experienced developers which I am not. I used to write C but that was over 20 years ago and don’t remember much of it at all.

Maybe someone can point me in the right direction as to how I get started to learn how to program with Electron from a beginner’s standpoint. I would greatly prefer to learn this programming language as it seems you can rapidly build desktop and web apps without worrying about making all the components play together like in Python.




The plain intro you’re looking for is here.

All Electron apps are written in JavaScript, HTML, and CSS. It’s sort of like a stripped-down browser with Node built in. Due to the way it’s built, it makes for fairly large applications in general, but it’s very easy to develop on and companies like Discord, Slack, and Automattic have leveraged it so that their web apps are instantly portable to desktop applications and any modern operating system. You can observe how Automattic built their web app Calypso separately and set it up so that they can just drop it into Wordpress Desktop at build time. The Electron-specific code is mostly for crash handling.

If you’re having difficulty with this, go into detail about what you’ve done and what you’re seeing and we can help you.


Thank you for the replies! Below is what I get when I try to install via NPM:

I run: npm install electron --save-dev

This is the error messages I get:
sgm@delllinux3 ~ $ npm install electron --save-dev

electron@1.4.4 postinstall /home/sgm/node_modules/electron
node install.js

sh: 1: node: not found
npm WARN enoent ENOENT: no such file or directory, open '/home/sgm/package.json’
npm WARN sgm No description
npm WARN sgm No repository field.
npm WARN sgm No README data
npm WARN sgm No license field.
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “electron” "–save-dev"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! electron@1.4.4 postinstall: node install.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the electron@1.4.4 postinstall script ‘node install.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/sgm/npm-debug.log
sgm@delllinux3 ~ $


Sounds like you don’t have Node installed. Have you downloaded it from https://nodejs.org/en/download?


Well I ran the following commands before trying to install Electron prebuilt:
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

When I type nodejs at the command line, node.js runs. Is this the correct thing to install? I followed this document explaning how to install node.js on Ubuntu:





npm cache clean



The problem is that you’ve installed the package with the name ‘nodejs’. The npm modules are looking for a ‘node’ command. I ran into the same problem when installing node on a server a month ago.

To verify or this really is the problem, go to your terminal and type:
node --version.
If the output reads something like ‘command unknown’ or ‘no such file or directory’. The cause is a naming conflict:

Checkout: http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04