일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 탄스택쿼리
- 인터넷
- CSS
- hooks
- 프론트엔드
- 리액트
- 개발공부
- 프론트
- Tanstack Query
- 조건문
- 프론트엔드 스쿨
- 개발
- TS
- 공식문서
- 코딩
- TypeScript
- 콜백
- 리액트쿼리
- 제로베이스
- JavaScript
- react
- props
- HTML
- components
- 개발자
- 부트캠프
- Tanstack
- 자바스크립트
- 타입스크립트
- JS
Archives
- Today
- Total
SUE 개발 블로그
npm ERR! permission denied, mkdir 본문
만든 프로젝트를 빌드하고 serve 명령어로 배포하는 과정에서
npm install -g serve 를 입력하면 아래와 같은 오류가 발생했다.
npm install -g serve
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/serve
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serve'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serve'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/serve'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
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! /Users/sueboi/.npm/_logs/2023-08-19T18_03_56_256Z-debug-0.log
에러 메세지를 읽어보면 "permission denied ... " 이라는 메세지가 보이는데 권한이 거부되었다는 것 같다.
이런 경우 명령어 앞에 sudo 를 붙여 루트 권한으로 명령어를 실행해야 한다.
이렇게 입력할 경우 비밀번호를 물어보는데 사용 중인 PC의 비밀번호를 입력해주면 된다.
npm의 경우 -g 옵션으로 글로벌 모듈 설치시 맥북에서 보통 이렇게 관리자 권한을 요구하는 것 !
비밀번호 까먹고 당황하지 말자 😕
'버그 & 디버깅 & 예외처리' 카테고리의 다른 글
버그 & 디버깅 & 예외처리 (0) | 2023.11.01 |
---|