mac린이2020. 7. 31. 10:21
728x90

npm을 시작하려고 다음의 명령어를 입력했습니다.

npm install -g ios-sim

 

그랬더니 다음과 같이 엄청난 에러가 발생했습니다!

min@minui-Mac appbrowser % npm install -g ios-sim 
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules'
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/min/.npm/_logs/2020-07-31T01_14_15_512Z-debug.log

 

자세히 읽어보니 Permission denied라는 단어가 눈에 들어왔습니다.

 

그래서 앞에 sudo를 붙였습니다.

※ sudo : 관리자권한으로 실행

sudo npm install -g ios-sim

 

비밀번호를 입력하니 아주 순조롭게 설치되었습니다. :)

반응형
Posted by mminky