[m1 mac] nvm 설치

chosh·2023년 1월 19일
0
  1. arch -arm64 brew install nvm 커맨드 입력

  2. 아래의 메세지가 뜨는지 확인

    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.
  3. mkdir ~/.nvm 커맨드 입력

  4. configuration file: 다음 부터,
    you can set 전까지 복사

  5. vi ~/.zshrc 커맨드 입력

  6. i 눌러서 insert 모드로 변경 후, 복사한 내용 붙여 넣기

  7. esc 눌르고 wq(write quit) 입력 후 엔터

  8. source ~/.zshrc 커맨드 입력하여 적용

  9. nvm -v 입력하여 설치된거 확인

  10. nvm help 입력하여 원하는 기능 명령어 확인
    ex)
    nvm ls 입력하면 설치되어있는 node 버전 목록 확인가능
    nvm install 버전하면 설치 가능 (nvm install 16)
    nvm alias default v버전하면 디폴트 버전 설정 가능 (nvm alias default v16)

profile
제가 참고하기 위해 만든 블로그라 글을 편하게 작성했습니다. 틀린거 있다면 댓글 부탁드립니다.

0개의 댓글