안녕하세요 강사님. 강의 잘 듣고 있습니다. :) 강의 진행 중 구글맵을 띄우는 과정에서 ERROR react-native-maps: AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS. 라는 오류가 발생하는데요, 이 때문에 구글맵이 보이지 않아서 진행이 어려운 상태 입니다. 앞서 해당 강의에서 8분 가량 설명 해주신 부분은 모두 진행 하였는데요, 어떻게 하면 구글 맵을 띄울 수 있을까요?ㅜㅜ
안녕하세여 강사님 강의 잘 듣고 있습니다. 다름이 아니라 회원가입 및 로그인 api 요청 성공시 onSuccess 함수 로직에 있는 queryClient.refetchQueries({ queryKey: [queryKeys.AUTH, queryKeys.GET_ACCESS_TOKEN], }); 이 코드로 getAccessToken ( /auth/refresh ) api 를 요청하고 있습니다. 여기서 문제는 getAccessToken 요청시 401 error 가 발생하고 있습니다. DB 에 회원가입으로 생성된 유저 데이터는 잘 생성된 상태이고 오타는 없어보입니다. ㅠㅠ 도와주세여 아래 이미지는 log 이미지입니다.
import React, {ReactNode} from 'react'; import { Pressable, StyleSheet, Text, PressableProps, Dimensions, View, StyleProp, ViewStyle, TextStyle, } from 'react-native'; import {colors} from '../../constants'; import useThemeStore from '@/store/useThemeStore'; import {ThemeMode} from '@/types/common'; interface CustomButtonProps extends PressableProps { label: string; variant?: 'filled' | 'outlined'; size?: 'large' | 'medium'; inValid?: boolean; style?: StyleProp<ViewStyle>; textStyle?: StyleProp<TextStyle>; icon?: ReactNode; } const deviceHeight = Dimensions.get('screen').height; function CustomButton({ label, variant = 'filled', size = 'large', inValid = false, style = null, textStyle = null, icon = null, ...props }: CustomButtonProps) { const {theme} = useThemeStore(); const styles = styling(theme); // 여기서는 제대로 출력이 됩니다. 값이 제대로 읽힙니다. console.log(colors[theme].PINK_700); return ( <Pressable disabled={inValid} style={({pressed}) => [ styles.container, pressed ? styles[`${variant}Pressed`] : styles[variant], inValid && styles.inValid, style, ]} {...props}> <View style={styles[size]}> {icon} <Text style={[styles.text, styles[`${variant}Text`], textStyle]}> {label} </Text> </View> </Pressable> ); } const styling = (theme: ThemeMode) => StyleSheet.create({ container: { borderRadius: 3, justifyContent: 'center', flexDirection: 'row', }, inValid: { opacity: 0.5, }, filled: { backgroundColor: colors[theme].PINK_700, }, outlined: { borderColor: colors[theme].PINK_700, borderWidth: 1, }, filledPressed: { backgroundColor: colors[theme].PINK_500, }, outlinedPressed: { borderColor: colors[theme].PINK_700, borderWidth: 1, opacity: 0.5, }, large: { width: '100%', paddingVertical: deviceHeight > 700 ? 15 : 10, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', gap: 5, }, medium: { width: '50%', paddingVertical: deviceHeight > 700 ? 12 : 8, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', gap: 5, }, text: { fontSize: 16, fontWeight: '700', }, filledText: { color: colors[theme].WHITE, }, outlinedText: { color: colors[theme].PINK_700, }, }); export default CustomButton; console.log(colors[theme].PINK_700); 이렇게 출력할 경우, 제대로 아래와 같이 출력이 됩니다만 스타일은 제대로 읽어오지 않습니다. 이 부분에 대해서 알고 싶습니다. BUNDLE ./index.js LOG Running "MatzipApp" with {"rootTag":171,"initialProps":{"concurrentRoot":false}} LOG light LOG #C63B64 LOG #C63B64 LOG #C63B64 ERROR TypeError: Cannot read property 'PINK_700' of undefined This error is located at: in CustomButton (created by ErrorBoundary) in RCTView (created by View) in View (created by ErrorBoundary) in ErrorBoundary (created by RetryErrorBoundary) in RetryErrorBoundary (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in _QueryClientProvider (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'WHITE' of undefined This error is located at: in RetryErrorBoundary (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in _QueryClientProvider (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'WHITE' of undefined This error is located at: in RetryErrorBoundary (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in _QueryClientProvider (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'WHITE' of undefined https://github.com/dydals3440/MatZip 좀더 정확히 판단을 위하여 제가 커밋한 레포 남겨드립니다!!!
[Nest] 27666 - 2024. 05. 23. 오후 12:23:25 ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat '/Users/제이름/MatzipApp/server/uploads/index.html'Error: ENOENT: no such file or directory, stat '/Users/제이름/MatzipApp/server/uploads/index.html' 아까 올린 문제는 제가 지역을 잘못봐서 .env 파일에서 수정해서 해결했습니다. 다시 실행해보니 이번엔 저런 오류가 뜨는데욥실제로 저런 디렉토리랑 파일이 서버 하위에 없긴 합니다.. 구글링해도 도저히 답이 안나와서 다시 한번 질문 드립니다!
해당 강좌 그대로 진행하다가, 의존성 배열 문제로 인해 무한 렌더링이 발생했습니다. 강사님의 깃허브 코드를 바탕으로, 강좌와 다르게 전역 상태로 관리를 진행하여 해결을 하긴 했습니다. 어떠한 문제로 인해, 무한 렌더링이 발생되고, 이럴 경우에 어떤 방식으로 접근해서 해결하는지에 대한 접근 방식에 대해 알고 싶습니다!!! web과 다르게 RN은 디버깅하기가 생각보다 쉽지않네요... ㅠㅠ
버그나 에러 질문은 아니구요! react native date picker 패키지를 이용해 DatePicker를 구현하는 단계있는데요, textColor prop을 타이핑할 때 자동완성이 안되어 찾아보니 올해 3월 23일에 릴리즈한 5.0.0에서 제거되었네요. https://github.com/henninghall/react-native-date-picker/releases/tag/5.0.0 대신 theme을 사용하라고 하는데, 기본값인 auto를 쓰거나 혹은 light로 설정하면 강의와 같이 text가 검은색으로 잘 나옵니다. 강의 들으시다가 저처럼 띠용하시는 분 계실까봐 참고차 남겨놓습니다! 좋은 강의 감사드립니다!
강사님! 저의 문제점이 다른 질문자들의 내용과 같은 상황이라 질문과 답변 내용을 참고하여 오류를 찾아보았는데 여전히 회원가입과 로그인버튼이 제대로 동작하지 않습니다. 서버도 켜놓았고 로그를 출력했으때 data값이 출력은 됩니다. 코드 확인 해주실수 있을까요? 한참 찾아보는데 문제가 어떤건지 못찾고있습니다. https://github.com/happyssun/FoodsMap
pgAdmin 서버 생성이 아래 첨부한 이미지에서 나오는 에러메세지가 나오면서 되지 않아요.. whoami 를 입력하면 나오는 USER를 Username으로 설정하고 비밀번호를 postgres 로하면 아래와 같은 에러가 발생하고 username 을 postgres 로 하고 비밀번호를 postgreSQL을 처음 받을때 제가 설정한 슈퍼유저 비밀번호로 하면 생성이 됩니다.. window 운영체제에서 진행하고 있습니다.
❗ 질문 작성시 꼭 참고해주세요 최대한 상세히 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다. 맥/윈도우, 안드로이드/iOS, 버전 등의 개발환경 도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요! 안녕하세요 저는 현재 웹으로 다른걸 개발하고 있는데, react-query로 auth를 개발하신거 참고하려고 강의내용을 따라가던중 버그같은게 있어서 질문드립니다. 저는 isLoggedIn 상태를 이런식으로 설정해보았는데요. const isLoggedIn = refreshTokenQuery.isSuccess; 예를 들어 제가 프로필 페이지에 있는데 isLoggedIn ? 개인프로필 내용 보여주기 : 로그인 버튼만 보여주기 인데요. 저는 로그인을 oauth 로그인만 구현해둔 상태입니다(google,kakao,naver) 예를들어 제 프로필페이지 isLoggedIn 가 false 인 상태이니 "로그인하세요" 버튼이 보일 것이고 클릭하면 bottom sheet로 올라오고 카카오 로그인 버튼을 누르면 카카오의 약관동의화면이나 아이디,비밀번호입력하는 페이지가 렌더링되겠죠 그 페이지에서 브라우저 뒤로가기버튼을 클릭하여 다시 프로필페이지로 이동하면 useGetRefreshToken 을 타면서 getAccessToken 함수가 호출되고 디스크 캐시로 부터 받아온 data 를 가져와 isSuccess 상태가 되어버리면서 isLoggedIn 은 true 인 상태가 되어버리고 프로필페이지 접근 인가가 되어버립니다. 구글링해보니 백포워드 캐시때문에 그렇다고 하는데, 해결방안이 GetAccessToken api header 에 Cache-control:no-store 옵션을 주면 cache 를 거부하게 만드는 방법이 있더라구요. (근데 저같은경우는 이런 옵션을 주면 getAccessToken api가 호출이 안되더라구요..) 근데 의문점은 로그아웃하면서 'auth' 에 해당하는 캐싱된 쿼리들을 무효화 시켰을텐데 캐싱된 데이터를 가져온다는게 좀 이해가 안됩니다. queryclient.removequeries 도 안되더라구요.
Data/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build export TEMP_DIR\=/Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build export TEMP_FILES_DIR\=/Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build export TEMP_FILE_DIR\=/Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build export TEMP_ROOT\=/Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex export TEST_FRAMEWORK_SEARCH_PATHS\=\ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks\ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/Developer/Library/Frameworks export TEST_LIBRARY_SEARCH_PATHS\=\ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib export TOOLCHAINS\=com.apple.dt.toolchain.XcodeDefault export TOOLCHAIN_DIR\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain export TREAT_MISSING_BASELINES_AS_TEST_FAILURES\=NO export UID\=501 export UNINSTALLED_PRODUCTS_DIR\=/Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/UninstalledProducts export UNSTRIPPED_PRODUCT\=NO export USER\=kim-yongmin export USER_APPS_DIR\=/Users/kim-yongmin/Applications export USER_LIBRARY_DIR\=/Users/kim-yongmin/Library export USE_DYNAMIC_NO_PIC\=YES export USE_HEADERMAP\=YES export USE_HEADER_SYMLINKS\=NO export USE_HERMES\=true export USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES\=YES export VALIDATE_DEVELOPMENT_ASSET_PATHS\=YES_ERROR export VALIDATE_PRODUCT\=NO export VALID_ARCHS\=arm64\ arm64e\ i386\ x86_64 export VERBOSE_PBXCP\=NO export VERSION_INFO_BUILDER\=kim-yongmin export VERSION_INFO_FILE\=React-Codegen_vers.c export VERSION_INFO_STRING\=\"@\(\#\)PROGRAM:React-Codegen\ \ PROJECT:Pods-\" export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES\=NO export XCODE_APP_SUPPORT_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Xcode export XCODE_PRODUCT_BUILD_VERSION\=15E204a export XCODE_VERSION_ACTUAL\=1530 export XCODE_VERSION_MAJOR\=1500 export XCODE_VERSION_MINOR\=1530 export XPCSERVICES_FOLDER_PATH\=/XPCServices export YACC\=yacc export arch\=undefined_arch export variant\=normal /bin/sh -c /Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Script-46EB2E00012AD0.sh /bin/sh: /Users/kim-yongmin/Desktop/RN: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code warning: Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'hermes-engine' from project 'Pods') warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'meltingpot' from project 'meltingpot') warning: Run script build phase '[CP-User] [RN]Check rncore' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Fabric' from project 'Pods') --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:6467FA54-9230-43CA-9818-9D9D12368E26, OS:17.4, name:iPhone 15 } { platform:iOS Simulator, id:6467FA54-9230-43CA-9818-9D9D12368E26, OS:17.4, name:iPhone 15 } ** BUILD FAILED ** The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/kim-yongmin/Library/Developer/Xcode/DerivedData/meltingpot-gquvlbyucsuermbjkfmfldzpeszt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Script-46EB2E00012AD0.sh (in target 'React-Codegen' from project 'Pods') (1 failure) 이런 에러가 발생하면서, 안드는 정상 동작하지만 ios는 정상 동작하지 않습니다. 해결 방법을 열심히 찾아봤는데 잘 모르겠습니다...!!