[RN error] watchman

stand up_ lee·2023년 12월 11일
0

RN - build error

목록 보기
9/9
post-thumbnail

React-native로 앱을 개발하기 위해 필요한 패키지를 expo-cli로 설치했다. 그런데 watchman 버전 때문인지, 계속 오류가 생겨 실행이 되지 않았다.
(Watchman은 특정 폴더나 파일을 감시하다가 변화가 생기면 특정 동작을 실행하도록 설정하는 역할이다. 즉시 ui에 업데이트됨)

Error Message :

watchmanResponse: { resolve_projpath: path : Operation not permitted , version: '2022.06.06.00'}

watchman 설치할 때 Homebrew 에러인지, watchman 버전이 날짜로 되어 있어 인식을 못한다는 글도 있고해서 이전 버전 설치를 하기도 하고, 재설치를 여러번 했는데, 해결되지 않았음.
또 시스템 설정 - 보안 및 개인정보 보호 - 전체 디스크 접근 권한에서 watchman을 추가 허용해주면 된다는 글을 보고 시도했지만, 일단 mac에서 watchman 프로그램 자체를 탐색하지 못함...

해결 방안

https://stackoverflow.com/questions/72451781/cant-use-watchman-operation-not-permitted?noredirect=1&lq=1

https://github.com/facebook/watchman/issues/1030

(watchman github를 보니 나와 같은 에러를 발견한 사람이 많았다...)

위 게시물 두 개 참고해서 진행했더니.. 드디어 됐다!!

watchman shutdown-server       # To ensure an old version isn't still running
brew uninstall watchman        # Get rid of the buggy (e.g., 2022.06.06.00) version
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/8651d8e23d308e564414188509f864e40548f514/Formula/watchman.rb > "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/watchman.rb"
brew install watchman          # This installs the functioning 2022.06.06.00 version dowloaded above
brew pin watchman              # Tell brew to leave this older version alone (don't forget to unpin once this problem is solved)
cd "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/"
git checkout --  watchman.rb   # To avoid brew showing warnings about having uncommitted git changes
watchman shutdown-server

watchman shutdown-server를 실행하여 이전 버전이 남아있지 않도록 해야한다. (안 그럼 오류 해결이 안되더라)

0개의 댓글