인프런 커뮤니티 질문&답변

김용민님의 프로필 이미지
김용민

작성한 질문수

맛집 지도앱 만들기 (React Native + NestJS)

[8-8] 앱 아이콘 적용하기

colors[theme]을 아무리 시도해봐도 못읽어옵니다!

해결된 질문

작성

·

139

0

캐시도 다 지워보고, 앱도 삭제해보고, 재설치도 해보고 해봤는데 원인을 모르겠네요...
강사님 코드로 바꿔넣어도, 동일하게 아래와 같은 에러가 발생합니다.

이유를 알고싶습니다..!!

ERROR  TypeError: Cannot read property 'PINK_700' of undefined

This error is located at:

    in CustomButton (created by AuthHomeScreen)

    in RCTView (created by View)

    in View (created by AuthHomeScreen)

    in RCTSafeAreaView (created by AuthHomeScreen)

    in AuthHomeScreen (created by SceneView)

    in StaticContainer

    in EnsureSingleNavigator (created by SceneView)

    in SceneView (created by CardContainer)

    in RCTView (created by View)

    in View (created by CardContainer)

    in RCTView (created by View)

    in View (created by CardContainer)

    in RCTView (created by View)

    in View

    in CardSheet (created by Card)

    in RCTView (created by View)

    in View (created by Animated(View))

    in Animated(View) (created by PanGestureHandler)

    in PanGestureHandler (created by PanGestureHandler)

    in PanGestureHandler (created by Card)

    in RCTView (created by View)

    in View (created by Animated(View))

    in Animated(View) (created by Card)

    in RCTView (created by View)

    in View (created by Card)

    in Card (created by CardContainer)

    in CardContainer (created by CardStack)

    in RNSScreen (created by Animated(Anonymous))

    in Animated(Anonymous) (created by InnerScreen)

    in Suspender (created by Freeze)

    in Suspense (created by Freeze)

    in Freeze (created by DelayedFreeze)

    in DelayedFreeze (created by InnerScreen)

    in InnerScreen (created by Screen)

    in Screen (created by MaybeScreen)

    in MaybeScreen (created by CardStack)

    in RNSScreenContainer (created by ScreenContainer)

    in ScreenContainer (created by MaybeScreenContainer)

    in MaybeScreenContainer (created by CardStack)

    in RCTView (created by View)

    in View (created by Background)

    in Background (created by CardStack)

    in CardStack (created by HeaderShownContext)

    in RNCSafeAreaProvider (created by SafeAreaProvider)

    in SafeAreaProvider (created by SafeAreaProviderCompat)

    in SafeAreaProviderCompat (created by StackView)

    in RCTView (created by View)

    in View (created by GestureHandlerRootView)

    in GestureHandlerRootView (created by StackView)

    in StackView (created by StackNavigator)

    in PreventRemoveProvider (created by NavigationContent)

    in NavigationContent

    in Unknown (created by StackNavigator)

    in StackNavigator (created by AuthStackNavigator)

    in AuthStackNavigator (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

답변 2

0

index.tsx 를 이렇게 바꾸니까 되더라고요


import colors from './colors';

export { colors };

export * from './navigations';

 

0

Kyo님의 프로필 이미지
Kyo
지식공유자

갑자기 상수를 못읽는 이유는 저도 알기가어렵습니다. 강의와 동일한 환경,코드로 해보셔야할것같아요.

김용민님의 프로필 이미지
김용민

작성한 질문수

질문하기