javascript:: nvm windows/wsl2로 nodejs 설치 및 버전 관리하기

 
 

FOR WINDOWS


아래 주소로 들어가서, 설치setup.exe파일을 다운받고 실행한다.
 
https://github.com/coreybutler/nvm-windows/releases/latest

 

Release v1.1.12 · coreybutler/nvm-windows

What's Changed Fix symlink detect if it points to nothing by @Tester798 in #963 Update README.md by @coreybutler in #1005 Change Winget Releaser job to ubuntu-latest by @sitiom in #1016 Update REA...

github.com

 
 
 

# node version 20 설
nvm install 20

# 사용할 node version 선택
nvm use 20

# node version 확인
node -v

 

 
 
 

 

 


FOR WSL2 

 

Install cURL (a tool used for downloading content from the internet in the command-line) with:  

sudo apt-get install curl

 

Install nvm, with: 

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash

 

 

Add Path for nvm

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

 

 

 


 

 

 

 

 

 


Reference

https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating 

 

GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions - nvm-sh/nvm

github.com

 

 

 

 

_

반응형