서버에서 살아남기

npm i -g @nestjs/cli 본문

각종에러

npm i -g @nestjs/cli

개발롬 2023. 2. 23. 17:28

전역에 nestjs를 설치하려고

npm i -g @nestjs/cli

를 입력했더니 아래와 같은 에러가 났다

npm ERR! code EACCES  
npm ERR! syscall mkdir  
npm ERR! path /Users/soohyunlee/.npm/\_cacache/content-v2/sha512/ff/41  
npm ERR! errno EACCES  
npm ERR!  
npm ERR! Your cache folder contains root-owned files, due to a bug in  
npm ERR! previous versions of npm which has since been addressed.  
npm ERR!  
npm ERR! To permanently fix this problem, please run:  
npm ERR!   sudo chown -R 501:20 "/Users/soohyunlee/.npm"  

npm ERR! A complete log of this run can be found in:  
npm ERR!     /Users/soohyunlee/.npm/\_logs/2023-02-23T08\_21\_57\_152Z-debug-0.log

해결법

sudo npm cache clean --force

로 캐시 지우고 다시

npm i -g @nestjs/cli

하면 설치 완료!!

'각종에러' 카테고리의 다른 글

prompt_status:5: command not found: wc  (0) 2023.03.17
zsh: command not found: eb  (0) 2023.03.12