1. 오류 상황
@react-native-community/async-storage 설치 후 실행 시 오류 발생
오류
ERROR Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.
To fix this issue try these steps:
• Run `react-native link @react-native-community/async-storage` in the project root.
• Rebuild and restart the app.
• Run the packager with `--reset-cache` flag.
• If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app.
• If this happens while testing with Jest, check out docs how to integrate AsyncStorage with
it: https://react-native-community.github.io/async-storage/docs/advanced/jest
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-async-storage/issues
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.
2. 오류 원인
2022년 12월 24일 기준 라이브러리가 아래와 같이 다른 곳으로 이동함
3. 해결 방법
https://github.com/react-native-async-storage/async-storage
npm i @react-native-async-storage/async-storage
를 통해 설치
'JAVASCRIPT' 카테고리의 다른 글
Next.js 13.2 시작하기 (Approuter) (0) | 2023.03.07 |
---|---|
firebase web version 8에서 회원가입, 인증 구현하기. (0) | 2023.01.03 |
styled-components 설치 시 unable to resolve dependency tree 오류 해결 (0) | 2022.12.23 |
스크롤 (1) | 2022.09.13 |
javascript) Canvas에 애니메이션을 위한 requestAnimationFrame (0) | 2022.09.07 |