I've been using NVM as my Node version manager for quite a long time to manage the different Node versions on my machine. NVM immediately reminds me of the time when I was using RVM (Ruby Version Manager).
Apart from a great name and massive usage,nvm has some issues that can be easily fixed with a “more modern” alternative.
I’ve recently started using Volta and it does have many advantages in comparison with nvm.
First of all, Volta is really fast (written in Rust, it claims to be ~40x faster than NVM). Switching to different versions or installing new Node/NPM versions has been a real pleasure. The startup time and project version switching are considerably fast.
Second, it always loads the correct Node version you need between your projects, whereas nvm doesn't do it by default. With nvm, each time you switch to a different project that runs a different Node version than the default one, you need to do this either by running nvm use <NODE_VERSION_NUMBER> or by locking a node version in a .nvmrc file for each of your projects. Furthermore, you will still need to have a script loaded in your bash profile terminal that automatically searches for a .nvmrc and updates the node version when needed. In addition, there is always a delay when switching to another version with nvm (Volta switches the Node version instantly).
Volta (and a few others such as pnpm that can also be used as a NodeJS version manager) handle this under the hood. This way, when you are dealing with multiple repositories using different Node versions, you won't have any bad surprises like updating some dependencies with the wrong Node version, for instance.
For instance, volta pin node@14 will store your pinned version in your package.json of your project.
"volta": {
"node": "14.21.2"
}
Each time you go to one of your projects, Volta will read your package.json file and automatically and instantly set the relevant NodeJS version that reflects with what was pinned. You can also (and very easily) install a specific Node version with the following through Volta volta install node@16.
Volta also allows you to install and pin globally your favorite package manager. e.g. volta install yarn && volta pin yarn@3 for Yarn berry v3.
package.json
...
"volta": {
"node": "18.17.1",
"yarn": "3.6.1"
}
...
It's also good to mention that Volta supports the same .nvmrc config file as nvm.
Global libraries
With Volta, the packages installed globally on your machine are associated with the correct Node version that installed them, so we are sure we use the stable packages that work on the current running Node version.
Windows support
Finally, although you might not need this, it’s nice to mention that Volta is also available on Windows, whereas nvm is only available on Mac/Linux machines.

Top comments (6)
Hello Pierre,
I recently discovered Volta while learning AdonisJS. I was surprised to find another Node.js version manager, which led me to your article. However, I didn’t fully understand the argument for switching from NVM to Volta based on this post.
From my perspective, the speed of switching or installing Node.js versions doesn’t really affect project performance. You mentioned using
.npmrcto lock the Node.js version, so all you need isnvm use ...—which seems to be just as simple, without needing to switch to Volta (though I don’t want to sound dismissive of it).Additionally, while NVM itself doesn’t officially support Windows, there are unofficial options like nvm-windows that provide similar functionality for Windows users.
Thanks for the insights!
Any thoughts, feel free to post them below 😊
In this article you claim Volta supports the same
.nvmrcconfig file as nvm, but I don't see anything in their docs about that or an example of how-to. Please advise or update the article if it is erroneous...It's incorrect. Volta does not support using
.nvmrcfiles, nor does it support using.node-versionfiles to detect versions. This is noted in an open issue on the Volta repository.Thanks for the nice article.
Volta is great. But I can't set up a proxy. Does anyone know how to do this?
Thank you in advance...
I'm super glad you enjoy the article and Volta, @jaroslavek! What kind of proxy are you trying to setup in this context?
Happy to help! 🤠
Some comments may only be visible to logged-in visitors. Sign in to view all comments.