DEV Community

Cover image for Switching between multiple Node versions with Node Version Manager

Switching between multiple Node versions with Node Version Manager

Maroje Macola on March 16, 2020

Hello dev.to readers! Intro This is my very first post here and hopefully many more will be written. Even though I've worked only on PH...
Collapse
 
thecodrr profile image
Abdullah Atta • Edited

Welcome to Dev.to. Wonderfully written and very useful. I use nvm all the time. Especially when testing my fdir library that supports multiple versions and it needs to be tested on all of them.

Collapse
 
wnbsmart profile image
Maroje Macola

Hello Abdullah!

Thanks for your warm welcome to this community. I can see that you also recently joined, so I wish you same back :)

Link to your library doesn't work, but I managed to find it anyway.
I'm glad that you found NVM useful, because it means that this post's goal to spread the word about it isn't wrong.

Thanks for your comment!

Collapse
 
thecodrr profile image
Abdullah Atta

Thanks a lot, Maroje! Yes, I mistyped the URL, haha. It's fixed now. Hope you liked the idea.

I'm glad that you found NVM useful, because it means that this post's goal to spread the word about it isn't wrong.

Indeed. There are many people out there who still do not know anything about version managers. This post is a good introduction. Keep it up!

: )

Collapse
 
frandieguez profile image
Fran Diéguez • Edited

What about using asdf-vm (asdf-vm.com/#/)? I hate to have multiple version managers to each tool. This handles all together.

Collapse
 
wnbsmart profile image
Maroje Macola

Hi Fran!

I haven't heard about that tool before, it seems really useful if you're working with multiple languages. If you used it, do you think it's not an overkill even if you're working with only 1 or 2 programming languages in total?

Thanks for your comment :)

Collapse
 
frandieguez profile image
Fran Diéguez

Hi,
I think that using something like asdf-vm and learn only one tool makes more sense than learning multiple tools that "do the same" and learn each particularity of each tool.

Collapse
 
pavelloz profile image
Paweł Kowalski

If you do a lot of switching (ie. using nvm use on every shell creation) i highly recommend fnm, which is A LOT faster.

Link: github.com/Schniz/fnm/

Collapse
 
wnbsmart profile image
Maroje Macola

Hi Pawel!

Thanks for your tool recommendation.
One question, what actullay makes fnm faster in comparison to nvm?

I see many similarities in installation process & available commands, so switching from nvm to fnm should also be easy, if someone decides to do so.

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

Im not really sure why its faster. I assume its just doing much less things underneath.

I found it when i added "nvm use" to my zsh_profile and every terminal in VSCode was running it... and it took over 1 second to open a terminal. I dont remember the exact numbers, but it was over 10x faster when doing that one thing. :)

Of course, keep in mind that i measured on my old computer, maybe on yours its not a factor at all :)

Collapse
 
kevinrambaud profile image
Kevin Rambaud

I use it too for the same reasons! I highly recommend it.

Collapse
 
moqsien profile image
moqsien • Edited

I'ver just created a much better version managers for multiple SDKs.
gvcgo.github.io/vmrdocs/

Collapse
 
wnbsmart profile image
Maroje Macola

What makes it better in comparison to NVM?