Script to always use the latest available Node version.
Note: This only runs the latest available Node binary and does not apply any changes like what
nvm use
does.
-
Download
node-
script:wget github.com/Arnesfield/node-/raw/main/node-
-
Allow executable permissions:
chmod +x ./node-
-
You can place the script in a directory that is included in your
$PATH
environment variable.
Use similarly to node
.
Example with v12.14.0
as default Node version with v18.17.1
also installed.
$ node -v
v12.14.0
$ node- -v
v18.17.1
Licensed under the MIT License.