npm cache 문제

CHLEE·2023년 4월 21일
3

TIL

목록 보기
9/9

실습을 하는 도중에 평소처럼 git clone해서 npm install을 하는데 에러가 발생했다..!

Your cache folder contains root-owned files, due to a bug in previous versions of npm which has since been addressed.

뭔가 캐시 문제인것 같아서 구글링..

https://stackoverflow.com/questions/59437833/error-your-cache-folder-contains-root-owned-files-due-to-a-bug-in-previous-ver

sudo npm cache clean --force

시도해보았으나 여전히 안되었다..

using --force Recommended protections disabled.

다시 구글링..

https://stackoverflow.com/questions/70180990/getting-npm-warn-using-force-recommended-protections-disabled

npm cache verify

-> cache 폴더의 내용을 확인하고, 가비지 데이터들을 수집하여 삭제하고 무결성을 확인함으로써 cache에서 꼬인 부분을 체크 및 해결하는 명령어.


잘 작동하였다 휴 😅

다시 검색해서 찾아보니 npm 버전이 제각각 설치되어서 버전 꼬임이 발생해서 그런 것이라고..
아마 이전 실습할 때 node 버전을 맞추려서 다운그레이드했고 다시 설치하고 하다보니 그렇게 된 것 같다.

참고 블로그 : https://icerabbit.tistory.com/78

profile
🤗

0개의 댓글