728x90
반응형

React Native/React Native_error 59

[React Native - ios/android] rn-fetch-blob 사용 시,WARN Require cycle

* rn-fetch-blob 설치 후 사용 시, 아래와 같은 warning 발생 WARN Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/Blob.js -> node_modules/rn-fetch-blob/index.js Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. WARN Require cycle: node_modules/rn-fetch-..

[React Native - ios] TypeError: Network request failed

* fetch() 를 사용해 api 를 호출 시, android 에서는 이상이 없었으나 ios 에서만 에러가 발생 TypeError: Network request failed # 원인 - 확인해보니 다양한 원인으로 발생할 수 있지만, 나의 경우는 호출 url 주소가 http 프로토콜을 사용하고 있어서 발생함 - iOS 9 버전 이후부터 적용된 보안 정책으로, 보안에 취약한 네트워크를 차단시킬 목적이라고 함 # 해결 - Info.plist 파일에서 NSAllowsArbitraryLoads 를 직접 코드를 추가하거나, xcode 에서 항목을 추가하여 해결 ... NSAppTransportSecurity NSAllowsArbitraryLoads NSExceptionDomains localhost NSExcep..

[React Native - ios] createMaterialTopTabNavigator Tab.Screen 구현 시, 최초 렌더링에서 full screen height 구현되지 않는 버그

* createMaterialTopTabNavigator 를 이용하여 상단 탭 구성 후 앱 실행 시, 최초 rendering 에서 Tab.Screen 전체가 표시되지 않고, 다른 탭으로 이동 후 돌아오면 정상적으로 표현됨 # 원인 react-native 에서 제공되는 SafeAreaView 를 사용했었는데, navigation 사용 시에는 react-native-safe-area-context 에서 제공하는 SafeAreaView를 사용해야 더욱 안정적이라고 했고, 변경하여 적용하였으나 동일한 현상이 발생함 * reference : https://reactnavigation.org/docs/handling-safe-area ++++ 최종적으로 react-native-pager-view 의 v5.4.15 ..

[React Native] ReferenceError: Can't find variable: Buffer

* 앱에서 axios 를 통해 브라우저를 읽어오려고 할 때 Warning 발생 # 경고 내용 WARN Possible Unhandled Promise Rejection (id: 0): ReferenceError: Can't find variable: Buffer http://10.0.2.2:8081/index.bundle? ... # 원인 axios를 통해 브라우저를 읽어오는 비동기 처리 시, Buffer 가 필요하다고 함 # 해결 아래와 같이 Buffer 라인을 추가해 주면 해결 import cheerio from 'cheerio-without-node-native'; import axios from 'axios'; global.Buffer = global.Buffer || require('buffe..

[React Native - ios ] N/A: version "default -> N/A" is not yet installed.

* Typescript 템플릿 설치 후 실행 시, ios 에서 에러 발생 # 에러 내용 ... N/A: version "default -> N/A" is not yet installed. ... You need to run "nvm install default" to install it before using it. ... xcodebuild[44462:710271] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple..

[React Native] TypeScript 템플릿 설치 에러

* TypeScript 템플릿 설치 시 에러 발생 npx react-native init LearnTypeScript --template react-native-template-typescript # 에러 내용 ... error An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: Not found". ... error This module isn't specified in a package.json file. info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this c..

[React Native - ios/android] Firebase auth() 인증 시, Given String is empty or null

* Firebase 의 auth() 를 사용하여 인증을 요청할 때, email 과 password 값을 빈 값으로 호출 시 android 에서만 에러 발생 Given String is empty or null ... import auth from '@react-native-firebase/auth'; // 로그인 export function signIn({email, password}) { return auth().signInWithEmailAndPassword(email, password); } // 회원가입 export function signUp({email, password}) { return auth().createUserWithEmailAndPassword(email, password); } ..

[React Native - ios/android] Error: [firestore/permission-denied] The caller does not have permission to execute the specified operation.

* react-native-firebase/auth 패키지의 auth().onAuthStateChanged(callback) 메소드 호출 시 발생한 에러 분명 어제까지 잘되었던 기능이 갑자기 오늘부터 안되기 시작함. WARN Possible Unhandled Promise Rejection (id: 0): Error: [firestore/permission-denied] The caller does not have permission to execute the specified operation. NativeFirebaseError: [firestore/permission-denied] The caller does not have permission to execute the specified opera..

[React Native - ios/android] Error: Unable to resolve module html-parse-stringify2

* package-lock.json 파일 삭제 후, package.json 을 최신 버전들로 재설치 (npm install) 후 실행 시 에러 발생 error: Error: Unable to resolve module html-parse-stringify2 from /Users/.../react-native/node_modules/react-i18next/dist/commonjs/Trans.js: html-parse-stringify2 could not be found within the project or in these directories: node_modules If you are sure the module exists, try these steps: 1. Clear watchman watche..

[React Native - ios/android] ERROR TypeError: _reactNative.Keyboard.removeListener is not a function

* toast 호출 후 navigation.navigate() 로 화면 이동 시 앱이 죽는 현상 발견 debug 모드로 error log 확인 시 _reactNative.Keyboard.removeListener 가 정상 동작 하지 않음을 확인 확인해보니 react-native v0.65 부터 removeListner() 메서드를 사용하지 않고, remove() 를 사용하는 것으로 변경됨 * reference : https://reactnative.dev/docs/0.65/keyboard#removelistener ToastContainer 에서 에러가 발생하고 있었기에 관련 package 버전을 확인해보니, 최신 버전에서 해당 이슈가 해결되어 있음을 확인 * reference : https://gith..

728x90
반응형