What is Volta?
To install you just need to run a command:
# install Volta
curl https://get.volta.sh | bash
Then, we can install any tool and use it normally:
# install Node
volta install node
# start using Node
You can pin versions in your projects as well:
volta pin node yarn
This command will add the versions in an object in
If you don’t have this versions, Volta will download them on the fly for you.
Why did I stop using NVM?
When I heard about Volta for the first time, I thought: I don’t need that, I’ve already using NVM.
Even so, I decided to take a look at Volta and realised that I was wrong. With NVM I was able to managing versions of Node, with Volta I can do this for any tool.
Furthermore, NVM has some points that bothered me:
I always needed to change the versions manually. To automate this it was necessary to add some settings to the shell, as well as add a
.nvmrcfile to the project.
There is a delay to change versions. With Volta this change is really faster and no-additional settings is required, it does it automatically.
This post was a brief introduction to Volta and some pros that I see compared to NVM, if you saw another pros or cons tell me in the comments.