p:: CLI, Node f:: npm, yarn

Install

curl https://get.volta.sh | bash
  Installing latest version of Volta (1.0.4)
    Checking for existing Volta installation
    Fetching archive for Linux, version 1.0.4
######################################################################## 100.0%##O=#  #
    Creating directory layout
  Extracting Volta binaries and launchers
    Finished installation. Updating user profile settings.
Updating your Volta directory. This may take a few moments...
success: Setup complete. Open a new terminal to start using Volta!

For bash, zsh, and fish, this installer will automatically update your console startup script.

Understanding Volta | Volta

Pinning Node engines

The volta pin command allows you to choose your Node engine and package manager versions for a project:

volta pin [email protected]
volta pin [email protected]

Volta stores this in your package.json so you can commit your choice of tools to version control:

"volta": {
  "node": "18.19.0",
  "yarn": "1.19.2"
}

This way, everyone who uses Volta to work on the project automatically gets the same version you selected.

node --version # 18.19.0
yarn --version # 1.19.2

Installing Node engines

you can select an exact version of node to be your default version:

volta install node@18
success: installed and set [email protected] (with [email protected]) as default