Useful Study

맥북 m1 node 세팅기

수밤바 2021. 2. 7. 20:48
728x90

+ homebrew 설치

- 터미널 옵션-정보가져오기 'Rosetta를 사용하여 열기'

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

 

 

오류!

Warning: /opt/homebrew/bin is not in your PATH.

vi .bashrc

입력

export PATH=/opt/homebrew/bin:$PATH

 

:q 로 빠져나온후

source ~/.bashrc

 

잘 설치되었는지 확인

brew help 

 

 

 

+ nvm 설치

brew install nvm

mkdir ~/.nvm

 

vi .bash_profile

추가

export NVM_DIR="$HOME/.nvm"

[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loa nvm [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"  # This loads nvm bash_completion

                             

nvm -v 로 확인

 

 

 

+ Node 설치

apple silicon은 node 15 부터 지원한다.

node 버전 15 이하를 설치할경우 Rosetta2를 이용하여 설치

- Resetta2 셸 시작

arch -x86_64 zsh
nvm install v12

 

 

 

 

 

참고

ninanung0503.medium.com/apple-silicon-m1-mac%EC%97%90-homebrew-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0-7b6c0d3aba08

 

Apple Silicon M1 Mac에 Homebrew 설치하기

부록 - Homebrew로 NVM설치하기

ninanung0503.medium.com

github.com/nvm-sh/nvm/issues/2350#issuecomment-734132550

 

 

 

 

 

nvm install node fails to install on macOS Big Sur M1 Chip · Issue #2350 · nvm-sh/nvm

I'm trying to install the latest version of node using nvm. I've just got the newly released SIlicon Macbook Pro with the M1 chip (not sure if that is related). I've installed xcode on ...

github.com