vs code터미널에 npm install -g serve 를 입력했더니 아래와 같은 오류가 나왔습니다.
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /Users/.npm-global/lib/node_modules/serve
npm ERR! dest /Users/.npm-global/lib/node_modules/.serve-UG2gnZWG
npm ERR! errno -13
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/.npm"
npm ERR! A complete log of this run can be found in: /Users/.npm/_logs/2024-04-16T11_43_14_217Z-debug-0.log
구글링해보니 관리자 권한 문제라고 해서 sudo install -g serve로 비밀번호 입력 후 설치해도 serve 기능이 실행되지 않습니다
이후 sudo chown -R 501:20 "/Users/.npm" 이 코드를 입력해도 진행되는 것이 없습니다.ㅜㅜ
npm install serve 만 입력할 때는
up to date, audited 1607 packages in 1s
274 packages are looking for funding
run `npm fund` for details
8 vulnerabilities (2 moderate, 6 high)
To address all issues (including breaking changes), run:
npm audit fix --force
이와 같이 나옵니다.. 마찬가지로 serve 를 실행해도 되지 않고요
npm install -g serve --no-fund 를 해도 실행되지 않았습니다ㅜㅜ 해결방법이 뭘까요
경로 문제일까요?