강의

멘토링

커뮤니티

Inflearn Community Q&A

iyyu0360's profile image
iyyu0360

asked

Bite-Sized React(React.js): From Basics to Practice

5.1) Preparing for Practice

npm install 명령 충돌 문제 문의

Resolved

Written on

·

157

0

안녕하세요. 강사님

mac os에서 react 실습을 위해 npm create vite@latest 명령으로 프로젝트 생성후

npm install 명령어 사용시 아래와 같은 에러가 발생하였습니다.

 

npm error code EEXIST

npm error syscall rename

npm error path /Users/iyyu/.npm/_cacache/tmp/9f07dca7

npm error dest /Users/iyyu/.npm/_cacache/content-v2/sha512/49/2e/ac0ddadc45673e1875be27d9e800ecb71c6d19b3093d78eae941b57686d6db724a1416e97affe9b66f3897f6634e1238fad6515f2d530f293983e18230d3

npm error errno EEXIST

npm error Invalid response body while trying to fetch https://registry.npmjs.org/json5: EACCES: permission denied, rename '/Users/iyyu/.npm/_cacache/tmp/9f07dca7' -> '/Users/iyyu/.npm/_cacache/content-v2/sha512/49/2e/ac0ddadc45673e1875be27d9e800ecb71c6d19b3093d78eae941b57686d6db724a1416e97affe9b66f3897f6634e1238fad6515f2d530f293983e18230d3'

npm error File exists: /Users/iyyu/.npm/_cacache/content-v2/sha512/49/2e/ac0ddadc45673e1875be27d9e800ecb71c6d19b3093d78eae941b57686d6db724a1416e97affe9b66f3897f6634e1238fad6515f2d530f293983e18230d3

npm error Remove the existing file and try again, or run npm

npm error with --force to overwrite files recklessly.

npm error A complete log of this run can be found in: /Users/iyyu/.npm/_logs/2025-07-05T06_41_32_142Z-debug-0.log

iyyu@yuilyongui-MacBookAir session05 % npm install --force

npm warn using --force Recommended protections disabled.

npm error code EEXIST


이전에 설치한 npm pakage 버전과 충돌 문제가 발생하는 듯 합니다.
해결 방법을 알 수 있을까요?

javascriptreactnode.js

Answer 2

0

iyyu0360님의 프로필 이미지
iyyu0360
Questioner

첨부해 주신 명령어들을 통해서 버전 충돌 문제가 해결되었습니다.

추가적으로 터미널에서 npm install, npm run dev 명령어들을 실행시 현재 프로젝트 폴더의 경로가 아닌 부모 프로젝트 경로에서 실행하면 정상적인 처리가 안되었던 것 같습니다.

0

winterlood님의 프로필 이미지
winterlood
Instructor

안녕하세요 이정환입니다.

npm 캐시가 꼬여 발생하는 문제로 보이네요 다음 순서대로 해보시면 해결될 것 같습니다.

npm cache clean --force

npm install

그래도 안되면 아래의 명령어를 통해 npm 전체 캐시 파일을 제거 해 보세요

sudo rm -rf ~/.npm

~/.npm 파일은 제거될 경우 자동으로 다시 생성되므로 괜찮습니다.

그래도 안되면 다시 문의 부탁드립니다.

iyyu0360's profile image
iyyu0360

asked

Ask a question