---
title: "Why I moving from NVM to Volta"
date: "2025-06-18"
slug: "why-i-moving-from-nvm-to-volta"
author: "Dany Paredes"
canonical: "https://danywalls.com/why-i-moving-from-nvm-to-volta"
description: "Nowadays, when we need to work with multiple apps and products, and each one has its own version of libraries, it is important to make your environment flexible to changes. At that moment, nvm becomes a great option to run multiple versions of Node o..."
---

Nowadays, when we need to work with multiple apps and products, and each one has its own version of libraries, it is important to make your environment flexible to changes.

At that moment, `nvm` becomes a great option to run multiple versions of Node on my machine, but I’m moving between multiple projects some of them with diferents version of node and needs to rememeber to tell nvm use a specific version is a time that i want to save.

Then Volta comes to save my time, Volta make sure my project has the same tools—without interfering with their workflow or needs to tell which enviroment is required.

The most loved feature of Volta is that it automatically switches to the correct Node.js and package manager versions when you `cd` into a project directory, without needing a manual command like `nvm use 22`.

By using the `volta pin` command, we set the Node version for the project, which automatically creates a Volta section in the `package.json`. This is used when moving between projects.

## Using Volta

First, let's install Volta. Since I'm using Windows, I'll use winget for the installation.

```bash
winget install Volta.Volta
```

After that, you just need to install Node by choosing the LTS version or selecting a specific version like 20.0.0.

![](/images/posts/why-i-moving-from-nvm-to-volta/fea468ca-43e8-4_59518.png)

## Automatic Node Switching

As I mentioned, Volta helps us set the Node version in the package.json by running the `volta pin` command. Let's show a demo.

First, I create a new project and use the command `volta pin` to set the version to node@20.

```bash
mkdir first-genkit
npm init -y
volta pin node@20
success: pinned node@20.19.2 (with npm@10.8.2) in package.json
```

Next, create another directory and start a new project. In this project, use the Node LTS version and pin it using the `volta pin node` command.

```bash
mkdir second-genkit
npm init -y
volta pin node
success: pinned node@22.16.0 (with npm@10.9.2) in package.json
```

Now, when I move between projects, the Node version switches automatically like magic! It also supports switching from npm to yarn.

![](/images/posts/why-i-moving-from-nvm-to-volta/c51e9173-e1ef-4_59519.png)

![](/images/posts/why-i-moving-from-nvm-to-volta/ce354eff-0646-4_59519.png)

I switched two months ago and forget `nvm use` 🤣! give a try it! [https://volta.sh/](https://volta.sh/)

Happy coding!

