nvm run 18 script.js

Category: Node.js & npm/yarn

nvm run 18 script.js

Run a script with a specific Node.js version without changing the current session

Directly runs a script with a specific Node.js version — a shorter form of 'nvm exec 18 node script.js'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.