본문 바로가기
IT지식

Volta!! node,package 버전 관리툴!!추천(nvm대체)

by cocogugu 2024. 5. 30.
반응형

오늘은 nvm 대체 툴인 volta를 소개할려고 한다!!

사내에서 nvm을 대체해서 좀 더 편하고 간단하게 node 버전을 관리하기 위해서 도입하게 된 툴인데

 

제가 꾸준히 보고 있는 IT정보 기사에서 알게 되어서 웹 개발팀에 도입하게 되었다.

 

간단하게 소개하면 node버전을 관리할 수 있는 툴로  Javascript Tool Manager 입니다.

 

global package의 버전을 프로젝트에 따라 다르게 관리 할 수 있어서 좋음!!

 

그리고 Rust로 만들어져 굉장히 빠른데(nvm또 빨라서 속도면에서는 큰 체감이 안 느껴짐)Window,Linux,MacOS를 지원

 

설치

https://docs.volta.sh/guide/getting-started

 

Getting Started | Volta

Getting Started Install Volta Unix Installation On most Unix systems including macOS, you can install Volta with a single command: curl https://get.volta.sh | bash For bash, zsh, and fish, this installer will automatically update your console startup scrip

docs.volta.sh

Windows에서 설치

https://docs.volta.sh/guide/getting-started#windows-installation

 

Getting Started | Volta

Getting Started Install Volta Unix Installation On most Unix systems including macOS, you can install Volta with a single command: curl https://get.volta.sh | bash For bash, zsh, and fish, this installer will automatically update your console startup scrip

docs.volta.sh

 

Linux에서 설치

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

 

MacOS에서 설치

curl https://get.volta.sh | bash
brew install volta

 

 

버전 고정(Pinning)

다운 후  밑 에 command로 사용할 버전을 프로젝트 별로 고정 할 수 있다. 

volta pin node@16.15.1
volta pin npm@8.11.0
volta pin yarn@1.22.19
volta pin pnpm@7.3.0

 

그리고 package.json에 설정해 놓으면 해당 프로젝트에서는 각 패키지의 버전이 설정된 버전으로 고정된다.!!

하지만 volta를 사용하는 사람만 적용되기 때문에 이 부분은 조심!

{
 // ...
  "volta": {
    "node": "16.15.1",
    "npm": "8.11.0",
    "yarn": "1.22.19",
    "pnpm": "7.3.0"
  }
}

 

반응형

댓글