Published on

Easily Switch Between Node.js Versions with n

Authors

If you work on multiple Node.js projects then chances are they might have different Node.js dependencies. And some packages might not work on the old or even in the new version of Node because of package dependencies.

Ever wondered to manage it easily?

That's where n comes in.

It helps you to manage multiple version of Node.js in your machine easily with a simple CLI/bash script which pretty much supports all OS (MacOS, Linux, Windows Subsystem for Linux)

Installing n

If you've Node.js installed already on your machine then you install it using npm as a global package like this

npm install -g n

You can also use brew to install it

brew install n

Installing a specific version of Node.js

Simply run n YOUR_VERSION_HERE

n 19.6.0

Switching between versions

Just run n and then select your version of choice and it'll set as a default one

Happy multiple node!