[Xcode] Command PhaseScriptExecution failed with a nonzero exit code Error 해결법


[Xcode] Command PhaseScriptExecution failed with a nonzero exit code Error 해결법

배경: 보통 m1맥북 사용자한테서 일어나는 에러. React Native 프로젝트 빌드 할 시 갑자기 Xcode에서 에러 발생. 원인: node를 homebrew로 설치해서 Xcode가 경로를 못 찾음. 해결법: which node 해당 명령어를 입력하여 본인이 저장한 node 경로를 확인. /opt/homebrew/bin/node 보통 homwbrew로 node를 설치했으면 이 경로가 나온다. (달라도 상관없음.) /usr/local/bin/node 해당 경로가 Xcode가 빌드 시 참조하는 node 위치. 따라서: ln -s $(which node) /usr/local/bin/node 해당 명령어 한 줄로 노드 위치를 심볼릭 링크로 만든다. 자 다시 핵심인 에러 내용을 본다. Error: Cannot find the node binary. Try setting the NODE_BINARY variable in the "Bundle React Native code and image...


#exit #m1맥북 #nonzero #PhaseScriptExecution #reactnative #whichnode #xcode에러

원문링크 : [Xcode] Command PhaseScriptExecution failed with a nonzero exit code Error 해결법