Set a Default Node Version with nvm

As I’ve shown you in the past, nvm an excellent utility for switching between Node.js versions. Whether your host machine or CI, building and testing your apps on different Node versions is a necessity. I’ve recently found a few nvm commands that I found really useful during local development. To set a default node version […]

The post Set a Default Node Version with nvm appeared first on David Walsh Blog.


This content originally appeared on David Walsh Blog and was authored by David Walsh

As I’ve shown you in the past, nvm an excellent utility for switching between Node.js versions. Whether your host machine or CI, building and testing your apps on different Node versions is a necessity. I’ve recently found a few nvm commands that I found really useful during local development.

To set a default node version on your machine, without touching your system’s install, you can use:

nvm alias default [version_here]

To automatically switch to the node version that best suits a project’s package.json file, simply type:

nvm use

I’ve always loved nvm but I still catch myself manually changing versions when I could automate that process with a few commands!

The post Set a Default Node Version with nvm appeared first on David Walsh Blog.


This content originally appeared on David Walsh Blog and was authored by David Walsh


Print Share Comment Cite Upload Translate Updates
APA

David Walsh | Sciencx (2021-08-09T16:19:11+00:00) Set a Default Node Version with nvm. Retrieved from https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/

MLA
" » Set a Default Node Version with nvm." David Walsh | Sciencx - Monday August 9, 2021, https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/
HARVARD
David Walsh | Sciencx Monday August 9, 2021 » Set a Default Node Version with nvm., viewed ,<https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/>
VANCOUVER
David Walsh | Sciencx - » Set a Default Node Version with nvm. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/
CHICAGO
" » Set a Default Node Version with nvm." David Walsh | Sciencx - Accessed . https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/
IEEE
" » Set a Default Node Version with nvm." David Walsh | Sciencx [Online]. Available: https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/. [Accessed: ]
rf:citation
» Set a Default Node Version with nvm | David Walsh | Sciencx | https://www.scien.cx/2021/08/09/set-a-default-node-version-with-nvm/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.