Updating Electron



I started a project with Electron a while ago. Since then, the version of electron has updated several times. However, for the life of me, I cannot figure out how to update the version of Electron my project is using.

How does someone update the version of Electron a project is using?


if you’re using local electron-prebuilt dependency with package.json, simply do npm update electron-prebuilt -save

or if you’re using the cli, use npm update electron-prebuilt -g


And if you’re not using electron-prebuilt dependency?


If you are not using the prebuilt, the command would end up being npm update electron --save


Great–I’ll give that a shot for our next release.


glad to help. also you can watch the dev dependencies in your package.json to make sure it changes the version. it should update once its done running the command. if the version has updated then it worked.


Next job: figure out when. I’d like to wait until the [Enter]/[PageUp]/[PageDn] key thing is fixed, because I had to remove support for those in our virtual keyboard. Maybe I can convince someone we’ll never need them. :slight_smile: