node.js 최신버전 업데이트 (윈도우)
급하신분들은 밑에서부터 읽기
js 라이브러리를 npm으로 까려다가 node.js를 업데이트 안한지 한참 된거 같아 업데이트를 시도하려고 했다.
그래서 아래 사이트를 참조해서 하려했는데
https://jsikim1.tistory.com/158
Node.js Upgrade 방법
Node.js Upgrade 방법 Node.js 업그레이드 하는 방법을 알려드리도록 하겠습니다. Node.js Update 방법 1. node -v 명령어로 현재 버전을 확인해봅니다. node -v 2. npm cache clean -f 명령어로 npm 캐시를 제거합니다.
jsikim1.tistory.com
npm install -g n
입력하는 순간
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@9.0.1: wanted {"os":"!win32"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
어머나 세상에 이게뭐람...
찾아보니 관련된 에러를 찾아보니 n이라는 패키지(?)는 배시 스크립트 기반으로 쓰여저서 더이상 윈도우에서 지원안한다고 한다.
https://github.com/tj/n/issues/491
Unsupported platform for n@2.1.8: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"}) · Issue #491 · tj
Issue Template: Describe issue including what OS you are using Install seems confused by the Win32 subsystem on my x64 OS? (W10 Pro x64) npm is in use and working otherwise. Describe what version o...
github.com
https://www.facebook.com/groups/nodejskr/posts/872678829499075/?mibextid=6NoCDW
로그인 또는 가입하여 보기
Facebook에서 게시물, 사진 등을 확인하세요.
www.facebook.com
그래서 윈도우용 node.js 관리툴을 사용하여 node js를 업데이트 하고 교체하였다.
1. 아래 url에가서 nvm을 설치후
https://github.com/coreybutler/nvm-windows
GitHub - coreybutler/nvm-windows: A node.js version management utility for Windows. Ironically written in Go.
A node.js version management utility for Windows. Ironically written in Go. - GitHub - coreybutler/nvm-windows: A node.js version management utility for Windows. Ironically written in Go.
github.com
(※ 이 이후 과정은 window power shell 혹은 cmd 수행)
2. 그리고 node js update 진행
nvm install lts
3. 버전 교체
nvm use 18.12.1
4. 이문구 나온거 확인하고 확인차로 버전체크를 다시해준다.
node -v