nklayman / vue-cli-plugin-electron-builder

Easily Build Your Vue.js App For Desktop With Electron
https://nklayman.github.io/vue-cli-plugin-electron-builder/
MIT License
4.12k stars 278 forks source link

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

Closed BaNkIck closed 1 year ago

BaNkIck commented 1 year ago

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!

BuiltTo1ast commented 1 year ago

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.

BaNkIck commented 1 year ago

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.