DEV Community

ehmicky
ehmicky

Posted on

1 2

Run any Node.js version

nve is a library that executes a file, command or REPL using a specific Node.js version.

Unlike nvm run it:

  • is 10 times faster
  • does not need a separate installation step for each Node version
  • works on Windows
  • does not require Bash
  • is installed as a Node module (as opposed to a Bash installation script downloaded with curl)
# Same as `node` but with Node 12
$ nve 12
Welcome to Node.js v12.8.0.
Type ".help" for more information.
> .exit

# Same as `node file.js` but with Node 8
$ nve 8 file.js

# Any Node CLI flag can be used
$ nve 8 --print 'process.version'
v8.16.0

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay