Lesson 12 of 28 · javascript
Installing Node, npm & Electron
Duration: 7 mins
Installing Node, npm & Electron
1️⃣ Node & npm – download from https://nodejs.org (LTS version). Verify:
node -v # e.g. v20.8.0
npm -v # e.g. 10.5.0
2️⃣ Create a project folder and initialise:
mkdir my‑app && cd my‑app
npm init -y # creates a bare package.json
3️⃣ Add Electron as a dev‑dependency:
npm install --save-dev electron
4️⃣ Add a start script to package.json:
"scripts": { "start": "electron ." }
Now npm start will launch Electron.