arch -arm64 brew install nvm
커맨드 입력
아래의 메세지가 뜨는지 확인
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
export PATH=/opt/homebrew/bin:$PATH
Add the following to ~/.zshrc or your desired shell
configuration file:
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
You can set $NVM_DIR to any location, but leaving it unchanged from
/opt/homebrew/opt/nvm will destroy any nvm-installed Node installations
export PATH=/opt/homebrew/bin:$PATH
upon upgrade/reinstall.
mkdir ~/.nvm
커맨드 입력
configuration file: 다음 부터,
you can set 전까지 복사
vi ~/.zshrc
커맨드 입력
i
눌러서 insert 모드로 변경 후, 복사한 내용 붙여 넣기
esc
눌르고 wq(write quit) 입력 후 엔터
source ~/.zshrc
커맨드 입력하여 적용
nvm -v
입력하여 설치된거 확인
nvm help
입력하여 원하는 기능 명령어 확인
ex)
nvm ls
입력하면 설치되어있는 node 버전 목록 확인가능
nvm install 버전
하면 설치 가능 (nvm install 16
)
nvm alias default v버전
하면 디폴트 버전 설정 가능 (nvm alias default v16
)