inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

처음 배우는 리액트 네이티브

프로필 화면

안드로이드 변수 오류

908

이승원

작성한 질문수 4

1

1. github 주소: https://github.com/Gophycal/Inflearn

2. 오류사항

ReferenceError: Can't find variable: IDBIndex

- ... 9 more stack frames from framework internals

 

Invariant Violation: "main" has not been registered. This can happen if:

* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.

* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.

at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException

at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException

at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError

at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError

3. package.json

{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/bottom-tabs": "^6.0.9",
"@react-navigation/native": "^6.0.6",
"@react-navigation/stack": "^6.0.11",
"expo": "^43.0.0",
"expo-image-picker": "~11.0.3",
"expo-status-bar": "~1.1.0",
"firebase": "^9.6.1",
"moment": "^2.29.1",
"prop-types": "^15.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-gesture-handler": "~1.10.2",
"react-native-gifted-chat": "^0.16.3",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-reanimated": "~2.2.0",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.8.0",
"react-native-web": "0.17.1",
"styled-components": "^5.3.3"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true
}

4. 문제 발생 지점: 안드로이드 애뮬레이터(Pixel_4)

5. 오류 내용

프로필 화면을 만들던 중 일어난 오류입니다. 구체적으로 navigations의 index, 그리고 firebase.js, screens의 Profile을 수정하여, 'Profile' 스크린에서 사용자의 정보에 따라 이름, 이메일, 사진 등을 보여주는 기능을 추가하는 중에 일어난 오류입니다.

지금 한 5시간째 찾아보고 있는데, 어떻게 해결하는지 잘 모르겠습니다. 추측으로는 노드 모듈에서 버젼이 안 맞는 게 있는 것 같은데, yarn이라든지, npm이라든지 노드 모듈 다 지우고 다시 install 하거나 add 했는데, 오류가 사라지지 않네요.

 

IOS 애뮬레이터(iPhone 13)에서는 오류가 없는데 이상합니다.

referenceerror javascript IDBIndex android react-native Pixel_4

답변 1

1

김범준

안녕하세요 이승원님, 

  

firebase 9.6.8 버전이 Expo와 뭔가 문제를 일으키는것 같습니다. 

firebase 9.6.7 버전을 이용하면 정상적으로 동작합니다. 

 

추가적으로, react-native-gesture-handler를 expo install 을 이용해서 설치하세요.

그 후, src/App.js 파일에 다음 코드를 추가하세요

import 'react-native-gesture-handler';

참고1: https://reactnavigation.org/docs/stack-navigator 

참고2: https://docs.expo.dev/versions/latest/sdk/gesture-handler/

  

즐거운 하루 되세요

감사합니다. 

0

이승원

빠르게 해결해주셔서 감사합니다!!!! 기다리고 있었어요!!!

맥북 m4에서 nvm으로 설치불가

0

103

2

expo 사용하지 않고 앱 실행 시, 데이터 불러오기

0

334

1

리덕스강의는 없나요?

0

264

1

선생님 도와주세요 ㅠㅠ (로그인, 회원가입, 콘솔 에러)

0

497

1

버젼 업데이트

0

411

1

expo start중 metro bundler가 같이 실행되지 않아요

0

497

1

모바일 expo 실행오류

0

847

1

안드로이드에서 expo실행이 안되요

0

834

2

터미널 다운 및 사용방법

0

291

1

expo init 에러

0

730

2

안녕하세요. 스택네비게이션 문제 질문드립니다 ㅜ

0

317

1

배포중 에러 해결이 안되네요.. ㅜㅜ

1

3215

1

안녕하세요! 강의 Chat App - Part 1 회원가입 부분에서 firebase 관련 에러가 납니다.

0

687

1

styled-components 에러

0

396

1

OS 네이트브 코드를 개발하면서 UI 를 리액트 네이티브로

0

481

1

저장하면 바뀐값들 보여야하는데 재렌더링이 안일어납니다..

0

494

1

안드로이드스튜디오 EXPO 어플 튕깁니다 ㅠㅠ

0

276

1

styled component를 사용하면 터집니다 ㅠㅠ

0

409

1

attrs, 속성, props 가 혼란스럽습니다.

0

347

1

안녕하세요, 강의 잘 들었습니다 :) RN과 파이어베이스 관련해서 질문드릴게 있습니다!

0

576

1

자꾸 The request timed out 에러가 뜹니다 .

0

1905

1

코드 좀 봐주세요 버튼 두개가 생성이 안되요

0

278

1

expo 실행시 스타일 속성 바로 보려면 어디서 보나요?

0

425

1

자바스크립트 () => 의미는요???

0

440

2