본문 바로가기

Develop/React

[ReactNative] expo 502 response

ReactNative 를 expo 를 이용해서 구동 시켰는데

안드로이드 expo app 에서 다음과 같은 에러가 발생했다.


<h2>Failed to complete tunnel conection</h2>

<hr />

<p>

  The connection to <strong><a href="http://~


...


<p>

  The error encountered was: <strong style="color: #9E2929">dial tcp [::1]:19001:getsockopt: connection refused</strong>

</p>


라는 화면이 뜨고

관련하여 packagerNgrokUrl 을 브라우저상에서 접근해보면

Failed to complete tunnel connection


The connection to http://packager.uq-yre.testusers.king-weather.exp.direct was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:19001.

Make sure that a web service is running on localhost:19001 and that it is a valid address.

The error encountered was: dial tcp [::1]:19001: getsockopt: connection refused


위와 같은 에러가 뜨는것을 확인할 수 있음.



위 ticket 에서 해당 이슈에 대한 답이 나옴.

다른건 다 모르겠고..

변경 내역을 훑어본 결과 패키지를 설치해줄때 npm 대신 yarn을 사용하는 내용이 있었음.


# 기존 설치된 패키지 삭제

]$ rm -r node_modules

# yarn 으로 새롭게 모듈 설치

]$ yarn install


이렇게 해주니 잘 동작하는 것 확인함.