nvm exec 18 node script.js
Category: Node.js & npm/yarn
nvm exec 18 node script.js
Run a command using a specific Node.js version without permanently switching
Runs a command using a specific Node.js version for just that one command, without switching your session's active version.