{{tag>[node.js version]}} ====== nvm: Node Version Manager ===== Node.js Version 관리 (기본적으로 mac, linux 지원) [[https://github.com/nvm-sh/nvm | Github]] ==== Reposiotory ==== * [[https://github.com/coreybutler/nvm-windows#installation--upgrades | windows nvm]] ===== CLI ===== * ''**nvm** **--version**'' * ''**nvm** **install** **--lts**'' * ''**nvm** **use** '': 특정 버전 사용 ===== Installation ===== # installs nvm (Node Version Manager) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # download and install Node.js (you may need to restart the terminal) nvm install 20 # verifies the right Node.js version is in the environment node -v # should print `v20.16.0` # verifies the right npm version is in the environment npm -v # should print `10.8.1` ++++ Set Enviroment Variables (Profile) | ''~/.profile'' ''~/.bash_profile'' ''~/.bashrc'' ''~/.zshrc'' export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm ++++