npm install --global expo-cli 안될 때

fejigu·2023년 2월 3일
1

Error Message

목록 보기
3/10
post-thumbnail

👉🏻 React Native로 구현한 코드를 모바일 폰으로 확인하고 싶은데,android studio 이나 xcode 셋팅 없이 확인할 수 있는 방법으로 Expo가 있다고 한다.


1. expo 설치

npm install --global expo-cli

2. 설치 되지 않고 나온 에러 메세지

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/expo-cli
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/expo-cli'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/expo-cli'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/expo-cli'
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/anjisu/.npm/_logs/2023-02-01T01_45_22_224Z-debug-0.log

3. 구글링을 통한 해결 방법

sudo npm install --global expo-cli

+ 본인의 경우, 맥 유저로 추가 설치

brew update
brew install watchman
profile
console.log(frontendjigu( ☕️, 📱); // true

0개의 댓글