본문 바로가기
이슈정리/node.js \ npm

npm / node.js 최신버전 업데이트 오류시 확인사항

by 매니션 2021. 5. 31.
반응형

npm / node.js 최신버전 업데이트 오류

$ npm cache clean -f
npm WARN npm npm does not support Node.js v12.16.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN using --force I sure hope you know what you are doing.

$ npm cache clean -force
npm WARN npm npm does not support Node.js v12.16.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN using --force I sure hope you know what you are doing.

$ npm install -g n
npm WARN npm npm does not support Node.js v12.16.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@7.2.2: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    !win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-05-28T06_39_10_705Z-debug.log

$ npm cache clean -f
npm WARN using --force Recommended protections disabled.

$ npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@7.2.2: 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
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-05-28T07_40_56_522Z-debug.log

- 오류

1) npm 및 node.js 최신버전 업데이트 실패

 

- 확인사항

1) 폴더 경로중 한글이 있으면 안됨

- 해결방법

폴더명 등 여러 사항을 확인해 봤지만 오류 원인을 발견하지 못해서 재설치함

> 삭제 후 재설치

 

 

- 재설치 방법

삭제 

1) C:\Program Files (x86)\Nodejs 폴더 / C:\Program Files\Nodejs 폴더 제거

2) C:\Users\Administrator\AppData\Roaming 폴더 안에 npm / npm-cahe 폴더 삭제

3) C:\Users\Administrator 폴더 안에 package-lock.json파일 / node_modules 삭제

4)  npm cache clean --force로 캐시 삭제

 

재설치

https://nodejs.org/ko/download/

 

다운로드 | Node.js

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

nodejs.org

 

1) 위 사이트에서 환경에 맞는 버전 다운 및 설치

2) 터미널에서 명령어로 확인

  터미널창 열기 : 시작프로그램>검색 > cmd (명령프롬프트) 검색

npm -v //npm 버전 확인
node -v //node.js 버전확인

현재 최신 버전

npm : 7.15.0

node.js : 16.2.0

반응형

'이슈정리 > node.js \ npm' 카테고리의 다른 글

git clone이 안될 때 해결법  (0) 2021.12.15

댓글