React-Native iOS 앱을 Archive 할 때, Build phase 에서 Bundle React Native code and images
스크립트가 실행된다.
단순하게 해당 경로에 있는 쉘 스크립트를 실행하는건데, 이 스크립트 내부에서 node 를 사용한다.
때문에 node binary 의 경로를 그 위에서 지정해주고 있는데
nvm 을 사용해서만 설치를 했다면 node 를 찾지를 못하는 이슈가 있다. env path 를 못찾는건지...🧐
심플하게 /usr/local/bin
에 node 를 추가하면 XCode 빌드 스크립트에서도 경로를 잘 찾는다.
아래는 현재 사용중인 node 의 경로를 찾아서 /usr/local/bin/node
에 심링크를 생성하는 스크립트이다.
ln -s $(which node) /usr/local/bin/node
관련된 업데이트
https://github.com/facebook/react-native/pull/33146
https://github.com/facebook/react-native/pull/33538