Skip to content

Instantly share code, notes, and snippets.

@keimlink
Last active June 3, 2024 09:57
Show Gist options
  • Save keimlink/def691fe2253a33d3e15f021458b2834 to your computer and use it in GitHub Desktop.
Save keimlink/def691fe2253a33d3e15f021458b2834 to your computer and use it in GitHub Desktop.
nvm vs Volta

nvm vs Volta

A comparison of nvm and Volta to manage Node.js projects (without Yarn).

Bootstrapping a Project

Bootstrapping a Project with nvm

nvm install

Note: Node.js version is pinned in .nvmrc.

Bootstrapping a Project with Volta

Not necessary.

Installing Node.js Dependencies

Installing Node.js Dependencies with nvm

npm install

Installing Node.js Dependencies with Volta

npm install

Note: Volta installs the right Node.js version when running npm install if the version is pinned in the volta section in package.json.

Continuing Work on a Project

Continuing Work on a Project with nvm

cd project
nvm use

Continuing Work on a Project with Volta

cd project

Note: No extra steps necessary with Volta.

Updating the Node.js version

Updating the Node.js version with nvm

nvm install

Updating the Node.js version with Volta

The next time npm install is executed Volta will automatically update Node.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment