카테고리 없음
[Node.JS] nvm: command not found 오류 해결
은그램
2022. 12. 13. 19:08
728x90
반응형
node.js를 공부하던 중,
nvm: command not found 라는 오류가 뜨고 말았다.😱😱😱😱
- nvm 이란 ?
Node Version Manager.
노드의 버전을 관리하는 도구라고 생각하면 된다.
homebrew를 통해 진행하니, 해결이 되었다.
이 때 까지는 아직 homebrew 설치 전이었는데, 구글링을 통해 homebrew를 설치하고 진행을 하게 되었다.
혹시나..
1. homebrew 페이지에 접근
Homebrew
The Missing Package Manager for macOS (or Linux).
brew.sh
2. 홈페이지 내에 있는 해당 명령어를 터미널을 통해 실행
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
간단 설치 끝.!
그 후,
1. brew를 통해 nvm 재설치
brew info nvm
2. .nvm 폴더 생성해서 환경설정 전 처리
mkdir ~/.nvm
3. bash_profile 파일 내 환경설정
vi ~/.bash_profile
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
source ~/.bash_profile
간단히 해결 👏👏👏!
728x90
반응형