잡다한 교훈 17

2022-01-14

Type '{ path: string; exact: boolean; component: () => Element; }' is not assignable to type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'. Property 'exact' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'. → react-router v6부터 exact를 더 이상 지원하지 않기 때문에 발생하는 문제이다. (exact가 없어진 이뉴는 대부분의 페이지들에서 exact=true가 적용되기 때문) 따라서..

잡다한 교훈 2022.01.15

2021-10-29 [iOS] Could not find a valid GoogleService-Info.plist in your project

분명히 firebase에서 googleservice-info.plist 파일을 다운로드해서 ios/{프로젝트명}에 넣어주었는데 위와 같은 에러가 발생할 수 있다. 이는 평소 습관대로 파일을 드래그&드롭해서 발생한 문제이다. 직접 파일을 옮겨주지 말고 Xcode로 프로젝트를 오픈한 후 프로젝트 폴더에서 우클릭-Add files to "프로젝트명"을 클릭하여 googleservice-info.plist 파일을 넣어준다. 파일을 넣어줄 때 설정은 다음과 같다.

잡다한 교훈 2021.10.29

2021-10-27 React Native - SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file

npx react-native run-android를 실행하였는데 Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '...'. >> 과 같은 오류가 발생한 경우 해결방안 (1) ANDROID_HOME 환경변수와 별개로 ANDROID_SDK_ROOT 환경변수를 생성한다. (값은 동일하게 적용) (2) 프로젝트의 android 폴더..

잡다한 교훈 2021.10.27

2021-10-22 일지

1. 클라이언트 측에서 CORS 해결 방법 (1) Chrome 바로가기를 하나 새로 생성한다. (2) 바로가기의 속성을 클릭한 후 바로가기 탭의 대상 영역 맨 뒤에 --disable-web-security --user-data-dir="C:\chrome"를 추가한다. (3) 해당 바로가기를 통해 다시 크롬을 실행하면 서버 측의 작업 없이도 CORS를 무시한 작업이 가능하다. 2. axios에서 폼 데이터를 전송하는 방법 (1) const bodyFormData = new FormData( ); (2) bodyFormData.append('key', 'value'); => 전송할 데이터를 넣어줌 (3) headers의 Content-Type을 'multiplart/form-data'로 지정하여 axios ..

잡다한 교훈 2021.10.22

2021-10-19 Android 어플과 Realtime Database

https://rnfirebase.io/database/usage Realtime Database | React Native Firebase Copyright © 2017-2020 Invertase Limited. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the Apache 2.0 License. Some partial documentation, under the rnfirebase.io 필요 작업을 모두 수행했음에도 불구하고 Realtime DB 처리가 되지 않는 문제가 발생..

잡다한 교훈 2021.10.19