[React Native] Error: Requiring module "node_modules\react-native-reanimated\src\index.ts” 에러 해결법

2022. 12. 7. 18:03·Front-End/React Native
목차
  1. 📝 해결법

Drawer Navigation을 설치하다가

다음과 같은 에러가 발생했습니다.

 

ERROR  Error: Requiring module "node_modules\react-native-reanimated\src\index.ts", which threw an exception: Error: Failed to initialize react-native-reanimated library, make sure you followed installation steps here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/      
1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the 
above link for details)
2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

 

✔ 에러 메시지를 잘 보면 정답이 있습니다.

제가 실수로 네비게이션에 필요한 모든 패키지를

Install 하지 않아서 발생한 에러였습니다.

또한 bable.config.js 파일의 수정이 필요합니다.

 



📝 해결법

 

https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

 

Installation | React Native Reanimated

Installing Reanimated requires a couple of additional steps compared to installing most of the popular react-native packages.

docs.swmansion.com

✔ 해당 사이트에 해결 방법이 제시되어 있습니다. 😀

 

⦁ 해결

 

//1. 터미널에 입력
yarn add react-native-reanimated

//2. babel.config.js 파일 수정
module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      'react-native-reanimated/plugin',
    ],
  };
};

 

 


 


참고 문헌 : https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

 

'Front-End > React Native' 카테고리의 다른 글

[React Native] 리액트 네이티브 차트 라이브러리 추천  (0) 2023.01.08
[React Native] RNSVGSvsViewAndroid 에러, ReadableMap 에러 해결방법  (0) 2022.12.15
[React Native] 리액트 네이티브 Expo Audio 녹음, 재생 구현하기  (0) 2022.11.24
[React Native] 리액트 네이티브 링크 Linking 사용방법  (0) 2022.11.17
[React Native] 리액트 네이티브 라인 차트 만들기 (react-native-chart-kit)  (0) 2022.10.31
  1. 📝 해결법
'Front-End/React Native' 카테고리의 다른 글
  • [React Native] 리액트 네이티브 차트 라이브러리 추천
  • [React Native] RNSVGSvsViewAndroid 에러, ReadableMap 에러 해결방법
  • [React Native] 리액트 네이티브 Expo Audio 녹음, 재생 구현하기
  • [React Native] 리액트 네이티브 링크 Linking 사용방법
현기
현기
  • 현기
    현기의 개발블로그
    현기
  • 전체
    오늘
    어제
    • 분류 전체보기 (120)
      • Front-End (39)
        • Next (5)
        • React (8)
        • React Native (11)
        • Flutter (0)
        • Vue (1)
        • JSP (9)
        • HTML, CSS, JS (5)
      • Back-End (16)
        • Node.js (3)
        • Spring (8)
        • Flask (1)
        • AWS (4)
      • DB (5)
        • Oracle (4)
        • MySQL (1)
      • Python (7)
      • Java (27)
        • 자바 이론 (17)
        • 코딩테스트 연습 & 실습 (10)
      • 자료구조 & 알고리즘 (7)
        • 코딩테스트 (6)
        • 알고리즘 (1)
      • 블록체인 (0)
      • 프롬프트 엔지니어링 (0)
      • CS 지식 (5)
      • IT뉴스 (0)
      • 일상 (3)
      • etc (11)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    큐
    상속
    IS-A
    자바
    리액트 네이티브
    React Native Chart
    node.js
    포스트맨
    JSP
    REST API
    오라클
    next-intl
    스택
    티스토리챌린지
    쓰레드
    JDBC
    자바 스프링
    Python
    Spring
    react
    그리디
    파이썬
    오블완
    자바스크립트
    Java
    React Native
    DI
    react-native-chart-kit
    서블릿
    Express
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
현기
[React Native] Error: Requiring module "node_modules\react-native-reanimated\src\index.ts” 에러 해결법
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.