Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in composeRestyleFunctions #295

Open
1 task
ilz5753 opened this issue Mar 27, 2024 · 2 comments
Open
1 task

error in composeRestyleFunctions #295

ilz5753 opened this issue Mar 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ilz5753
Copy link

ilz5753 commented Mar 27, 2024

Current behavior

throw in:

// node_modules/@shopify/restyle/dist/composeRestyleFunctions.js
var buildStyle = function (props, _a) {
        var theme = _a.theme, dimensions = _a.dimensions;
        var styles = {};
        var options = { theme: theme, dimensions: dimensions };
        // We make the assumption that the props object won't have extra prototype keys.
        // eslint-disable-next-line guard-for-in
        for (var key in props) {
 /* >> */    var mappedProps = funcsMap[key](props, options);
            // eslint-disable-next-line guard-for-in
            for (var mappedKey in mappedProps) {
                styles[mappedKey] = mappedProps[mappedKey];
            }
        }
        var stylesheet = react_native_1.StyleSheet.create({ stylesheet: styles }).stylesheet;
        return stylesheet;
    };
shot
Simulator Screen Shot - iPhone 14 Pro Max - 2024-03-27 at 17 29 59

Expected behavior

to code work fine

Stack Trace

TypeError: funcsMap[key] is not a function (it is undefined)

This error is located at:
    in Unknown (created by Splash)
    in RCTView (created by View)
    in View
    in Unknown (created by TouchableOpacity)
    in TouchableOpacity (created by TouchableOpacity)
    in TouchableOpacity (created by Splash)
    in RCTView (created by View)
    in View
    in Unknown (created by AnimatedComponent(Component))
    in AnimatedComponent(Component)
    in Unknown (created by Splash)
    in RCTView (created by View)
    in View
    in Unknown (created by AnimatedComponent(Component))
    in AnimatedComponent(Component)
    in Unknown (created by Splash)
    in Splash (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by SceneView)
    in RCTView (created by View)
    in View (created by DebugContainer)
    in DebugContainer (created by MaybeNestedStack)
    in MaybeNestedStack (created by SceneView)
    in RCTView (created by View)
    in View (created by SceneView)
    in RNSScreen
    in Unknown (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 SceneView)
    in SceneView (created by NativeStackViewInner)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by ScreenStack)
    in RNSScreenStack (created by ScreenStack)
    in ScreenStack (created by NativeStackViewInner)
    in NativeStackViewInner (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by NativeStackView)
    in NativeStackView (created by NativeStackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by NativeStackNavigator)
    in NativeStackNavigator (created by NativeStackNavigation)
    in NativeStackNavigation (created by Index)
    in Index (created by App)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by App)
    in ThemeProvider (created by App)
    in QueryClientProvider (created by Provider)
    in RCTView (created by View)
    in View (created by KeyboardAvoidingView)
    in KeyboardAvoidingView (created by Provider)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by Provider)
    in RCTView (created by View)
    in View (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by Provider)
    in Provider (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 RNComponents(RootComponent), js engine: hermes

To Reproduce

Platform:

  • iOS (16.2, iPhone 14 Pro Max)

Environment

@shopify/[email protected]

@ilz5753 ilz5753 added the bug Something isn't working label Mar 27, 2024
@VirtuaBoza
Copy link

@ilz5753 Are you certain your component tree is wrapped with the ThemeProvider?

@doulgs
Copy link

doulgs commented May 25, 2024

Na hora de realizar a criação do seu tema, tenta incluir

textVariants: {
defaults: {},
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants