Node Version Management


Volta (Node Version Manager)


$ curl https://get.volta.sh | bash

$ exec -l $SHELL


$ volta --version
2.0.2


// Volta will choose the latest LTS
$ volta install node yarn npm

// $ volta install node@18 npm@9 yarn@3


$ node -v
v22.18.0


$ npm -v
11.5.2


$ yarn -v
4.9.2


// Add current version info inside package.json
$ volta pin node yarn npm


package.json

  "volta": {
    "node": "v18.14.0",
    "npm": "9.6.0"
  },


Remove volta


// remove here
$ vi ~/.profile


$ rm -rf ~/.volta/