react-native 0.54.4로 이전하면서 부딪히는 문제들

오래전에 생성해던 프로젝트를 react-native 0.54.4로 이전하면서 부딪힌 문제와 그 해결책에 대해 메모한 내용을 공유합니다. 비슷한 경험이 있거나 더 나은 해결책을 아시는 분들은 알려주세요. :pray:


  • Can't find 'node' binary to build React Native bundle

    • 맥북에서 node를 n으로 설치했기에 node의 기본 경로가 달라서 그러는 것. bin/node으로 ln 만들어 주거나 rn 프로젝트의 node 참조하는 부분의 링크 변경해줌. (전자 선택)
  • Debug js remotely 관련 에러

    • iOS 실제 디바이스에서 remote debug를 켰을 경우 다음 에러

      • No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8081’ is therefore not allowed access. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled

      • chrome에서 debugger-ui를 사용하는 주소를 http://localhost:8081/debugger-ui/ 대신에 http://192.168.1.4:8081/debugger-ui/ 처럼 실제 주소로 사용

    • Android Emulator에서 js remote debug 했을 때 10.0.2.2로 debuger ui 실행되면서 하얀 화면에서 멈추는 상황

      • js remote debug를 활성화 하기전에 packager가 실행된 상태에서 http://localhost:8081/debugger-ui/ 로 접속한다음에 debug 실행
      • 개발자 메뉴 안나타나고 있다면 android 앱 재설치 후 위 설명 다시 시도
  • console에 다음 워닝 ( 파악 전 )

    • Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
      
  • react-native-fast-image 에서도 https가 아닐경우 info.plist 수정 필요

  • react-native-navigation

  • react-native-photos-framework

    • iOS build error

      Undefined symbols for architecture x86_64:
        "_OBJC_CLASS_$_RCTSRWebSocket", referenced from:
            objc-class-ref in libReact.a(RCTInspectorPackagerConnection.o)
        "_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from:
            objc-class-ref in libReact.a(RCTPackagerConnection.o)
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
      
    • 해결 :RNPhotosFrameworkTests.xctest 를 Project - Target - Build Phases -> Link Binary With Libraries 에 추가된 RNPhotosFrameworkTests.xctest 를 제거

1개의 좋아요