본문 바로가기
Mobile Develop/React Native

[React Native] RN watchman 권한 오류 해결하기 | /Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist

by nyangzzi 2024. 7. 18.
반응형

 

 

리액트 네이티브로 프로젝트 세팅하고

npm start로 실행했는데 처음부터 알 수 없는 오류 등장..

 

2024-07-18T21:40:15,920: [cli] Failed to open /Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Fatal error detected at:
0   libfolly.0.58.0-dev.dylib           0x0000000102fc1f14 _ZN5folly10symbolizer17getStackTraceSafeEPmm + 12

1   libfolly.0.58.0-dev.dylib           0x0000000102fc3104 _ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb + 80
2   watchman                            0x0000000100879120 _ZL15log_stack_tracev + 64
3   watchman                            0x000000010087905c _ZN8watchman3Log13doLogToStdErrEv + 552
4   watchman                            0x00000001008766f0 _ZN8watchman9Publisher7enqueueEO8json_ref + 464
5   watchman                            0x00000001007e0c94 _ZN8watchman3Log3logIJRA16_KcRA4096_cRA13_S2_NSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEERA2_S2_EEEvNS_8LogLevelEDpOT_ + 384
6   watchman                            0x00000001007d9be8 main + 2188
7   dyld                                0x000000018b9b20e0 start + 2360
(safe mode, symbolizer not available)

Watchman:  watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2024-07-18T21:40:15,920: [cli] Failed to open /Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Fatal error detected at:
0   libfolly.0.58.0-dev.dylib           0x0000000102fc1f14 _ZN5folly10symbolizer17getStackTraceSafeEPmm + 12
1   libfolly.0.58.0-dev.dylib           0x0000000102fc3104 _ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb + 80
2   watchman                            0x0000000100879120 _ZL15log_stack_tracev + 64
3   watchman                            0x000000010087905c _ZN8watchman3Log13doLogToStdErrEv + 552
4   watchman                            0x00000001008766f0 _ZN8watchman9Publisher7enqueueEO8json_ref + 464
5   watchman                            0x00000001007e0c94 _ZN8watchman3Log3logIJRA16_KcRA4096_cRA13_S2_NSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEERA2_S2_EEEvNS_8LogLevelEDpOT_ + 384
6   watchman                            0x00000001007d9be8 main + 2188
7   dyld                                0x000000018b9b20e0 start + 2360
(safe mode, symbolizer not available)

 

 

(눈물이 앞을 가린다)

 

 

해당 오류는 아래 파일에 쓰기 권한이 없어서 발생한다고 함

/Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist

/Users/user/Library/LaunchAgents/com.github.facebook.watchman.plist

 

 


해결 방법

터미널에 아래 두 줄을 실행하여 생각보다 간단하게 해결되었다

 

$ sudo chown -R $(whoami) /Users/user/Library/LaunchAgents
$ sudo chmod -R u+rw /Users/user/Library/LaunchAgents

파일 경로는 나의 디렉토리 대로 변경해서 실행할 것!

반응형

댓글