React Native) firebase "Property with 'retain (or strong)' attribute must be of object type" 에러 해결

2ast·2023년 1월 1일

기존에 firebase 모듈이 설치된 상태에서 추가로 firebase remote config를 적용하려고 했다. 따라서 가이드를 따라 yarn add @react-native-firebase/remote-config 명령어를 치고 패키지를 설치했으나, 에러가 발생했다.

해당 에러 코드를 구글링한 결과 remote config는 아니지만 messaging 패키지에서 동일한 에러가 발생한 케이스를 발견할 수 있었다.

원인은 꽤나 단순했는데, 여러 버전의 react-native-firebase을 혼합해서 사용했을 때 발생하는 에러였다. 실제로 이전에 셋팅되어 있던 react-native-firebase 패키지들은 12.0.0인데 반해, 이번에 새로 설치한 remote-config는 16.5.0 버전이었다.

아래 명령어를 통해 12.0.0 버전의 remote-config를 설치해서 에러를 해결했다.

yarn add @react-native-firebase/remote-config@12.0.0

끝.

profile
React-Native 개발블로그

0개의 댓글