• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    해결됨

RNNaverMapMarker을 UIManager가 찾지 못하는 에러

22.08.01 21:42 작성 조회수 752

0

안녕하세요 에러가 발생해 질문 남깁니다.

현재 [ch 4] 네이버맵 연동하기 진행 중입니다.

 

현재 아래와 같은 에러가 생깁니다.

 

 

 

components/EachOrder.tsx 에선 NaverMapView 컴포넌트에 빨간 줄이 생깁니다.

 

react-native-nmap 모듈은 문제 없이 찾아 옵니다.
 
 
 
NaverMapView 컴포넌트에 마우스를 올리면 No overload matches this call. 라고 뜹니다. 자세한 내용은 아래와 같습니다.
 
No overload matches this call.
Overload 1 of 2, '(props: NaverMapViewProps | Readonly<NaverMapViewProps>): NaverMapView', gave the following error.
Type '{ children: Element[]; style: { width: string; height: string; }; zoomControl: false; center: { zoom: number; tilt: number; latitude: number; longitude: number; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<NaverMapView> & Readonly<NaverMapViewProps>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<NaverMapView> & Readonly<NaverMapViewProps>'.
Overload 2 of 2, '(props: NaverMapViewProps, context: any): NaverMapView', gave the following error.
Type '{ children: Element[]; style: { width: string; height: string; }; zoomControl: false; center: { zoom: number; tilt: number; latitude: number; longitude: number; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<NaverMapView> & Readonly<NaverMapViewProps>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<NaverMapView> & Readonly<NaverMapViewProps>'.ts(2769)
 
 
node_moddules/react-native-nmap/index.tsx 를 살펴봤는데
NaverMapView class return 구문에서도 에러가 있습니다.
 
실행에 문제가 있어 강의 진행이 어렵습니다. 도와주세요.

답변 1

답변을 작성해보세요.

0

앱 지웠다가 다시 설치하세요. 저 타입스크립트 에러는 리액트 18버전 쓰시면 감수해야하는 애러입니다. 네이버지도가 18버전을 지원하지 않습니다.

node_modules 폴더와 yarn.lock 파일 삭제하고, ios 폴더로 이동해 pod deintegrate 후 다시 pod install하니까 빌드 됩니다.  감사합니다.