nklayman / vue-cli-plugin-electron-builder

Easily Build Your Vue.js App For Desktop With Electron

Home Page:https://nklayman.github.io/vue-cli-plugin-electron-builder/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to change node version (e.g. use node 16 or 18)

BaNkIck opened this issue · comments

Hi,

Sorry if it's not the place to ask. I don't know anywhere else to ask this.

I've installed this package in a fresh vue-cli project. After running npm run electron:serve, even though I'm using Node 16 to run this command, when I type process.versions.node on the console of the app it reports version 14.

I need to use at least Node 16 in my project. Is there any way to change it?

Thanks!

you can just upgrade electron`s version,such as electron v21.4.0,the node version of electron(v21.4.0) is 16.16.0.

Thanks! That did it.

I looked everywhere and tried a lot of options of different packages and didn't think of the most obvious.

I checked the releases page of electron and I can see that there they list the browser version and the node version of each release. Thank you again for pointing me in the correct direction.