Windows 에서 node. js 의 다 중 버 전 관리 도구

11139 단어
Linux 에서 나 는 nodejs 의 다른 버 전 을 관리 하기 위해 nvm 을 사용 해 왔 지만 nvm 에는 windows 버 전이 없 었 다. 오늘 은 windows 에서 다른 버 전 관리 도구 nvm - windows 를 사용 하여 관리 할 수 있다 는 것 을 발견 했다.
다운로드 및 설치 다운로드 주소:https://github.com/coreybutler/nvm-windows/releases
설치 하기 전에 주의해 야 할 것 이 있 습 니 다. 만약 이전에 node 를 설치 한 적 이 있다 면 먼저 마 운 트 를 해제 하고 디 렉 터 리 를 깨끗이 정리 해 야 합 니 다.다음은 공식 적 으로 설명 한 것 이다.
It comes with an installer (and uninstaller), because getting it should be easy. Please note, you need to uninstall any existing versions of node.js before installing NVM for Windows. Also delete any existing nodejs installation directories (e.g., "C:\Program Files
odejs
") that might remain. NVM's generated symlink will not overwrite an existing (even empty) installation directory. You should also delete the existing npm install location (e.g. "C:\Users\AppData\Roaming
pm
") so that the nvm install location will be correctly used instead. After install, reinstalling global utilities (e.g. gulp) will have to be done for each installed version of node:

 
설치 할 때 두 개의 디 렉 터 리 를 만들어 야 합 니 다. 하 나 는 nvm 의 설치 디 렉 터 리 이 고 하 나 는 node 소프트 연결 을 만 드 는 디 렉 터 리 입 니 다.
nvm 의 설치 디 렉 터 리 (절대 경로 모든 등급) 에는 중국어 나 두 단어 이상 의 경로 가 존재 하지 않 는 것 이 좋 습 니 다. 예 를 들 어 Progrom Files 등 이 있 습 니 다. 그렇지 않 으 면 명령 실행 에 오류 가 발생 할 수 있 습 니 다.
모든 다운로드 한 node 패 키 지 는 nvm 설치 디 렉 터 리 에서 node 소프트 연결 디 렉 터 리 만 변경 하고 node 소프트 연결 디 렉 터 리 를 환경 변수 에 추가 합 니 다.원 리 는 간단 하 다.
 
현재 설 치 된 nodejs 버 전 보기 사용 하기
C:\Users\kongxx> nvm list

No installations recognized.

 
새로 설치 되 었 기 때문에 알림 시스템 에 버 전이 설치 되 어 있 지 않 습 니 다.
설치 가능 한 nodejs 버 전 보기
C:\Users\kongxx> nvm list available

| CURRENT | LTS | OLD STABLE | OLD UNSTABLE |
|--------------|--------------|--------------|--------------|
| 8.8.1 | 6.11.5 | 0.12.18 | 0.11.16 |
| 8.8.0 | 6.11.4 | 0.12.17 | 0.11.15 |
| 8.7.0 | 6.11.3 | 0.12.16 | 0.11.14 |
| 8.6.0 | 6.11.2 | 0.12.15 | 0.11.13 |
| 8.5.0 | 6.11.1 | 0.12.14 | 0.11.12 |
| 8.4.0 | 6.11.0 | 0.12.13 | 0.11.11 |
| 8.3.0 | 6.10.3 | 0.12.12 | 0.11.10 |
| 8.2.1 | 6.10.2 | 0.12.11 | 0.11.9 |
| 8.2.0 | 6.10.1 | 0.12.10 | 0.11.8 |
| 8.1.4 | 6.10.0 | 0.12.9 | 0.11.7 |
| 8.1.3 | 6.9.5 | 0.12.8 | 0.11.6 |
| 8.1.2 | 6.9.4 | 0.12.7 | 0.11.5 |
| 8.1.1 | 6.9.3 | 0.12.6 | 0.11.4 |
| 8.1.0 | 6.9.2 | 0.12.5 | 0.11.3 |
| 8.0.0 | 6.9.1 | 0.12.4 | 0.11.2 |
| 7.10.1 | 6.9.0 | 0.12.3 | 0.11.1 |
| 7.10.0 | 4.8.5 | 0.12.2 | 0.11.0 |
| 7.9.0 | 4.8.4 | 0.12.1 | 0.9.12 |
| 7.8.0 | 4.8.3 | 0.12.0 | 0.9.11 |
| 7.7.4 | 4.8.2 | 0.10.48 | 0.9.10 |

 
지 정 된 버 전의 node 를 설치 합 니 다. 여기 6.10.0 과 7.10.0 두 가지 버 전이 설치 되 어 있 습 니 다.
C:\Users\kongxx> nvm install 6.10.0 64-bit
...

C:\Users\kongxx> nvm install 7.10.0 64-bit

 
설 치 된 버 전 다시 보기
C:\Users\kongxx> nvm list

7.10.0
6.10.0

 
지정 한 버 전의 node 사용 하기
C:\Users\kongxx> nvm use 6.10.0
Now using node v6.10.0 (64-bit)

C:\Users\kongxx> nvm list

7.10.0
* 6.10.1 (Currently using 64-bit executable)

C:\Users\kongxx> node -v
v6.10.0

 
지정 한 버 전의 nodeC: \ \ Users \ kongxx > nvm uninstall 7.10.0 삭제
 
전환 하 다https://blog.csdn.net/kongxx/article/details/78421050

좋은 웹페이지 즐겨찾기