4 ms·
I can't speak for Windows but on both OSX and Linux, upgrading Electron versions is as simple as upgrading the version number of the `electron-prebuilt` depende
by wyqydsyq 10y ago
I can't speak for Windows but on both OSX and Linux, upgrading Electron versions is as simple as upgrading the version number of the `electron-prebuilt` dependency of your project and running `npm update`. You can also use the `npm-check-updates` package to upgrade to the latest version automatically.
- rmason 10y agoInteresting that you mention npm-check because that was recommended to me. The web page explaining it looked fabulous and I thought it would solve all my problems. But running it took six hours and it crashed. Found online somewhere that it can't handle the size of electron, too many nested directories I guess. Tried just updating and it appears to have worked, but now everything crashes and the error message isn't very helpful.
- wyqydsyq 10y agoIf you just jumped up some major versions it's likely that you've upgraded to a version with breaking API changes. I'd suggest reading the changelogs between your old and new versions. Assuming you're using the prebuilt version (which you should be unless you're hacking on Electron itself) there shouldn't be any issues upgrading - it just downloads the latest prebuilt binary, there really aren't many files.
- creshal 10y agoElectron's build process on Windows is somewhere between byzantine and arcane, especially when native dependencies are involved. You do exactly the same steps three times, twice it works, the third time you will have to gouge your eyes out and draw blood pentagrams onto your hard disk.
- WorldMaker 10y agoTo make things even gentler `electron-prebuilt` is now called just `electron` (yay!). That said, the problem right now is still if you ever need any node native dependencies because electron because building those seems to be complicated on every platform. Right now my quest is to avoid native dependencies that aren't in the prebuilt electron. It's interesting because Cordova is a tiny bit better at handling native plugins. Unicorn dream is that I'd really love so see some sort of convergence in Cordova and Electron plugin approaches, especially when it comes to native dependencies. (For various reasons several major projects I'm working on need to target both Cordova and Electron; it would be nice if it were a more seamless experience.)