I Bet you don't know NVM
No Humans ,Machine, TL and Managers are harmed in this blog.
So Many of you heard of NVM in your Company or Job or by any good youtuber out there. but how many of you really know what is NVM !.
Let go to the basic and classical definition of the NVM :
- Node Version Manager : It is a tool which let you control the version of node you are using in your in machine, mac, linux, or shitty windows.
Now don't you dare to tell me you don't know Node, well if you don't know leave this blog and first search what is node you -- filthy π· like my friend Akash (No Offence Bro π€ ) ?
Now first question come up to your mind is how to install it ? Correct Right π . if this question not come to your mind you better dig a π³ and β° yourself.
For Mac / Linux (Real Programmer π )
- from terminal you can download it with the help fo curl (like real programmers do)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
- If you are not a curl fan do not be worry you can use wget
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
- Now once it is install Restart you terminal and run these following command which ever is working for you.
source ~/.bashrc
or (~/.zshrc
or ~/.profile
, anything applicable for you π
)
For Windows Users ( Loosers π)
You guys can use nvm-windows, just click on below link and download don't give me a headache π«.
if this doesn't work : https://github.com/coreybutler/nvm-windows/releases
hope you guys have install it so far, if not throw you laptop /PC out of your room you feel better trust me π. and don't come here again you are free from pain now.
Let see things which we can do with NVM now. and try these things by yourself. Don't let your fat ass just sitting on your couch, your expensive gamming chair which i don't have and yes I am already jealous of you π or whatever just do it.
Note : Don't set your GF on fire if you didn't get this in first go .
Check the version : C'mom man you already know --version from Node
nvm --version
Try by yourself in terminal. I am not putting any output here π.
Check Available Node version you want to download :
nvm list available
This is give you all Current , LTS and every version of node you can download you will see like this
See I told y'll you don't know all π
Installing any Node Version : even my dog can do this, but i don't have one π₯.
nvm install 20.16.0
as you seen above at (2) whatever version you want to intall just copy paste it and use the above command more generic form is like nvm install <version> update version with your required version and you can download n version of node .
Now to Check How many node version you have use below command
nvm list
you can also use nvm ls as well choices up to you. You need GF or not π.
Now IF you want to check which version i am using : C'mon man so simple same like your current relationship status Broke and Single π.
nvm current
This will give you the current version of your Node you are using. but still you see your current status as broke and Single π.
Now you want to use Diffrent version of Node : Because your TL want to showcase his knowledge and want you to feel dumb. Don't worry I got you covered bro BroCode π.
nvm use 18.20.4
but make sure this version is install into your machine , and you know how to check right πΆπΆπΆ !! aslo you know how to install right πΆπΆπΆ!!! , more generic version for the command is nvm use <version installed in your machine> . and there you have it you can use any version of Node in you machine same like your EX used you π©π€.
If you want to uninstall any version : you know how to uninstall it right πΆ, how the hell in this universe you can make you GF happy . She took the right decison to leave you. same she did the 10 more versions like you like this
nvm uninstall 18.20.4
Here you go, you successfull uninstalled node specific version from you machine same like your ex delete you from her heart πͺ. i am not writing generic form for this for far you can guess what it is.
That's it from my side, hope you make your partner happy π and your TL will be a less nightmare π to you. now you know to show off your skill and feel free to share the blog with your TL so that he can know their nightmare is also out there for their blood π§ββοΈ.
Subscribe to my newsletter
Read articles from Shreyash Bijlwan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Shreyash Bijlwan
Shreyash Bijlwan
Shreyash is a lazy coder who left corporate life because he can't work under someone. He enjoys teamwork, coding, and avoids solving problems already solved."Don't re-invent the wheel unless necessary