volta run --node=18 node script.js

Category: Node.js & npm/yarn

volta run --node=18 node script.js

Run a command with a specific Node.js version without changing the project or global default

Runs a one-off command with a specific Node.js version without changing the project pin or global default.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.