'PROBLEM: installing/updating electron using npm install --> ERR code 1
The latest stable version of electron is version 16.0.7
If I ask it to update to the latest, it's staying at version 1.4.13
currently using a Mac terminal zsh
node version: v17.4.0
npm version: 8.3.1
nvm version: 0.39.1
Now, appartently I did end up getting electron installed at some point. I was struggling with it for a long time getting this:
zsh: command not found: electron
However, now when I type it, I get this:
electron version: v1.4.13
Apparently, somehow, I managed to install a super outdated version of electron. And now I'm having an equally frustrating problem of updating it.
Using the documentation found here: https://www.electronjs.org/docs/latest/tutorial/updates
I gave it the following line:
npm install update-electron-app
And as a result it shows:
up to date, audited 91 packages in 896ms
5 packages are looking for funding run
npm fundfor details
found 0 vulnerabilities
However, now when I ask for the version, it still gives me v1.4.13 even if I restart the terminal.
Now, I really, really need some help.
Somewhere else I remember reading that if you simply give the install command again, it will install the latest updated version (ie, you don't have to do anything about the already-installed older version). Here it is: https://www.electronjs.org/docs/latest/tutorial/electron-versioning
So I tried this:
npm install electron --save-dev
P.S. I think the way I ended up actually installing it was going roundabout as follows: I first installed home-brew. Then I used home-brew to install GitHub. Then I used get hub to install electron from the dedicated link provided on electron's GitHub webpage.
Continuing on...
The most strange thing is that the updating command, that used to throw errors, seems to be working fine now. When I typed:
npm install --save-dev electron@latest
It provided this back:
up to date, audited 91 packages in 888ms
5 packages are looking for funding run
npm fundfor details
found 0 vulnerabilities
So, I'm guessing that means it's done, right?
What's very strange at, least to me, is that if you go to
As far as I can tell, the version I have installed is from 5 years ago, and the latest stable version (that should have been installed using the previous command) is version 16.
All I want to do is play around with electron and see how it works and use it a little bit. But before I can do any of that I have to install the Darn thing. And that's proving to be very difficult and frustrating... please help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
