DEV Community

ehmicky
ehmicky

Posted on

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)