헤르메스 LIFE

Windows환경에서 npm / node.js 최신버전으로 설치 본문

CSR(Client Side Rendering)

Windows환경에서 npm / node.js 최신버전으로 설치

헤르메스의날개 2022. 7. 17. 22:02
728x90

버전확인

C:\>node -v
v16.14.2

C:\>npm -v
8.5.0

npm 설치 - 오류가 발생됐습니다.

C:\>npm install -g npm
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.14.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.14.0
npm notice Run npm install -g npm@8.14.0 to update!
npm notice
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\nodejs\node_modules\.npm-QXjMEw5N
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.npm-QXjMEw5N'
npm ERR!  [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.npm-QXjMEw5N'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'C:\\Program Files\\nodejs\\node_modules\\.npm-QXjMEw5N'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jongyoung.park\AppData\Local\npm-cache\_logs\2022-07-17T12_32_15_810Z-debug-0.log

C:\>

관리자 권한으로 설치해야 합니다.

C:\>npm install -g npm

removed 189 packages, changed 20 packages, and audited 29 packages in 2s

found 0 vulnerabilities

C:\>npm -v
8.14.0

npm 은 최신버전으로 설치되었습니다.


Windows에서 Node.js를 최신버전으로 설치하기 위해서는 홈페이지에서 프로그램을 다운받아 설치하시면 됩니다.

https://nodejs.org/en/download/

LTS 버전으로 다운받아 설치하세요.

C:\>node -v
v16.16.0
728x90