본문 바로가기
개발/에러해결

n stable 후 node old version

by amkorousagi 2022. 10. 22.

에러 내용


n stable node old version

text
copying : node/16.16.0 installed : v16.16.0 (with npm 8.11.0) Note: the node command changed location and the old location may be remembered in your current shell. old : /usr/bin/node new : /usr/local/bin/node If "node --version" shows the old version then start a new shell, or reset the location hash with: hash -r (for bash, zsh, ash, dash, and ksh) rehash (for csh and tcsh)

n stable로 노드 업데이트 이후에도 node --version 시 구버전이 나옵니다.

에러 원인


n stable의 출력에 나와있듯이 아직 현재 shell이 구버전의 설정을 기억하고 있기때문입니다.

 

해결 방법


1. 새로운 셀을 엽니다.

 

또는 

 

text
hash -r

위 명령어를 통해 현재 shell이 기억하고 있는 (구버전 설정) 기억을 지웁니다.

 

참고 자료


n stable 시 출력

댓글