homebrew를 이용한 nvm 설치
프로젝트를 진행하다가 협업 중에 다운그레이드를 한다던지 버전을 높여야 하는 경우가 있어 nvm을 설치하였다.
nvm이란?
dev@ui-MacBook ~ % nvm -v
zsh: command not found: nvm
dev@ui-MacBook ~ % brew -v
Homebrew 4.1.18
터미널에서 nvm -v로 nvm이 설치가 되지 않은 것을 확인 후 brew -v로 homebrew가 설치된 것을 확인
brew install nvm
위 명령어로 nvm을 설치
dev@ui-MacBook ~ % nvm -v
zsh: command not found: nvm
dev@ui-MacBook ~ % mkdir ~/.nvm
dev@ui-MacBook ~ % source ~/.bash_profile
source: no such file or directory: /Users/dev/.bash_profile
dev@ui-MacBook ~ % nvm -v
zsh: command not found: nvm
dev@ui-MacBook ~ % source ~/.zshrc_profile
source: no such file or directory: /Users/dev/.zshrc_profile
dev@ui-MacBook ~ % nvm -v
zsh: command not found: nvm
dev@ui-MacBook ~ % nvm ls
zsh: command not found: nvm
dev@ui-MacBook ~ % nvm -v
zsh: command not found: nvm
dev@ui-MacBook ~ % brew -v
Homebrew 4.1.20
dev@ui-MacBook ~ % brew install nvm
Warning: nvm 0.39.5 is already installed and up-to-date.
To reinstall 0.39.5, run:
brew reinstall nvm
dev@ui-MacBook ~ %
dev@ui-MacBook ~ % mkdir ~/.nvm
mkdir: /Users/dev/.nvm: File exists
dev@ui-MacBook ~ % vi ~/.zshrc
dev@ui-MacBook ~ % source ~/.zshrc
dev@ui-MacBook ~ % nvm -v
0.39.5