web-ridge / react-native-paper-tabs

Smooth and fast cross platform Material Design Tabs for React Native Paper
https://reactnativepapertabs.com
MIT License
201 stars 36 forks source link

'SwiperNative' render method problem. #33

Closed SectionTN closed 2 years ago

SectionTN commented 2 years ago

NodeJS server stacktrace: btw sorry the error looks so long. this exactly happened after downloading the library


Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check your code at Swiper.native.tsx:100.
    in SwiperNative (at Tabs.tsx:53)
    in Tabs
    in ThemedComponent (created by withTheme(Tabs))
    in withTheme(Tabs) (at HomeScreen.tsx:20)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
    in SafeAreaProvider (at HomeScreen.tsx:19)
    in RCTView (at View.js:32)
    in View (at SafeAreaView.js:41)
    in SafeAreaView (at BaseView.tsx:27)
    in BaseView (at HomeScreen.tsx:18)
    in HomeScreen (at SceneView.tsx:126)
    in StaticContainer
    in EnsureSingleNavigator (at SceneView.tsx:118)
    in SceneView (at useDescriptors.tsx:210)
    in RCTView (at View.js:32)
    in View (at DebugContainer.native.tsx:27)
    in DebugContainer (at NativeStackView.native.tsx:71)
    in MaybeNestedStack (at NativeStackView.native.tsx:230)
    in RNSScreen (at createAnimatedComponent.js:242)
    in AnimatedComponent (at createAnimatedComponent.js:295)
    in AnimatedComponentWrapper (at src/index.native.tsx:252)
    in MaybeFreeze (at src/index.native.tsx:251)
    in Screen (at NativeStackView.native.tsx:176)
    in SceneView (at NativeStackView.native.tsx:278)
    in RNSScreenStack (at src/index.native.tsx:191)
    in ScreenStack (at NativeStackView.native.tsx:269)
    in NativeStackViewInner (at NativeStackView.native.tsx:323)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46)
    in SafeAreaProviderCompat (at NativeStackView.native.tsx:322)
    in NativeStackView (at createNativeStackNavigator.tsx:67)
    in NativeStackNavigator (at Stack.tsx:93)
    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)
    in BaseNavigationContainer (at NavigationContainer.tsx:132)
    in ThemeProvider (at NavigationContainer.tsx:131)
    in NavigationContainerInner (at Stack.tsx:92)
    in StackNavigator (at App.tsx:30)
    in ThemeProvider (at Provider.tsx:104)
    in RCTView (at View.js:32)
    in View (at PortalHost.tsx:125)
    in Portal.Host (at Provider.tsx:102)
    in Provider (at App.tsx:29)
    in Provider (at App.tsx:28)
    in App (at renderApplication.js:50)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:92)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:43)
    in MoonNotes(RootComponent) (at renderApplication.js:60)
 ERROR  Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `SwiperNative`.

This error is located at:
    in SwiperNative (at Tabs.tsx:53)
    in Tabs
    in ThemedComponent (created by withTheme(Tabs))
    in withTheme(Tabs) (at HomeScreen.tsx:20)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
    in SafeAreaProvider (at HomeScreen.tsx:19)
    in RCTView (at View.js:32)
    in View (at SafeAreaView.js:41)
    in SafeAreaView (at BaseView.tsx:27)
    in BaseView (at HomeScreen.tsx:18)
    in HomeScreen (at SceneView.tsx:126)
    in StaticContainer
    in EnsureSingleNavigator (at SceneView.tsx:118)
    in SceneView (at useDescriptors.tsx:210)
    in RCTView (at View.js:32)
    in View (at DebugContainer.native.tsx:27)
    in DebugContainer (at NativeStackView.native.tsx:71)
    in MaybeNestedStack (at NativeStackView.native.tsx:230)
    in RNSScreen (at createAnimatedComponent.js:242)
    in AnimatedComponent (at createAnimatedComponent.js:295)
    in AnimatedComponentWrapper (at src/index.native.tsx:252)
    in MaybeFreeze (at src/index.native.tsx:251)
    in Screen (at NativeStackView.native.tsx:176)
    in SceneView (at NativeStackView.native.tsx:278)
    in RNSScreenStack (at src/index.native.tsx:191)
    in ScreenStack (at NativeStackView.native.tsx:269)
    in NativeStackViewInner (at NativeStackView.native.tsx:323)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46)
    in SafeAreaProviderCompat (at NativeStackView.native.tsx:322)
    in NativeStackView (at createNativeStackNavigator.tsx:67)
    in NativeStackNavigator (at Stack.tsx:93)
    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)
    in BaseNavigationContainer (at NavigationContainer.tsx:132)
    in ThemeProvider (at NavigationContainer.tsx:131)
    in NavigationContainerInner (at Stack.tsx:92)
    in StackNavigator (at App.tsx:30)
    in ThemeProvider (at Provider.tsx:104)
    in RCTView (at View.js:32)
    in View (at PortalHost.tsx:125)
    in Portal.Host (at Provider.tsx:102)
    in Provider (at App.tsx:29)
    in Provider (at App.tsx:28)
    in App (at renderApplication.js:50)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:92)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:43)
    in MoonNotes(RootComponent) (at renderApplication.js:60), js engine: hermes
 ERROR  Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `SwiperNative`.

This error is located at:
    in SwiperNative (at Tabs.tsx:53)
    in Tabs
    in ThemedComponent (created by withTheme(Tabs))
    in withTheme(Tabs) (at HomeScreen.tsx:20)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
    in SafeAreaProvider (at HomeScreen.tsx:19)
    in RCTView (at View.js:32)
    in View (at SafeAreaView.js:41)
    in SafeAreaView (at BaseView.tsx:27)
    in BaseView (at HomeScreen.tsx:18)
    in HomeScreen (at SceneView.tsx:126)
    in StaticContainer
    in EnsureSingleNavigator (at SceneView.tsx:118)
    in SceneView (at useDescriptors.tsx:210)
    in RCTView (at View.js:32)
    in View (at DebugContainer.native.tsx:27)
    in DebugContainer (at NativeStackView.native.tsx:71)
    in MaybeNestedStack (at NativeStackView.native.tsx:230)
    in RNSScreen (at createAnimatedComponent.js:242)
    in AnimatedComponent (at createAnimatedComponent.js:295)
    in AnimatedComponentWrapper (at src/index.native.tsx:252)
    in MaybeFreeze (at src/index.native.tsx:251)
    in Screen (at NativeStackView.native.tsx:176)
    in SceneView (at NativeStackView.native.tsx:278)
    in RNSScreenStack (at src/index.native.tsx:191)
    in ScreenStack (at NativeStackView.native.tsx:269)
    in NativeStackViewInner (at NativeStackView.native.tsx:323)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46)
    in SafeAreaProviderCompat (at NativeStackView.native.tsx:322)
    in NativeStackView (at createNativeStackNavigator.tsx:67)
    in NativeStackNavigator (at Stack.tsx:93)
    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)
    in BaseNavigationContainer (at NavigationContainer.tsx:132)
    in ThemeProvider (at NavigationContainer.tsx:131)
    in NavigationContainerInner (at Stack.tsx:92)
    in StackNavigator (at App.tsx:30)
    in ThemeProvider (at Provider.tsx:104)
    in RCTView (at View.js:32)
    in View (at PortalHost.tsx:125)
    in Portal.Host (at Provider.tsx:102)
    in Provider (at App.tsx:29)
    in Provider (at App.tsx:28)
    in App (at renderApplication.js:50)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:92)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:43)
    in MoonNotes(RootComponent) (at renderApplication.js:60), js engine: hermes

Affected platforms

RichardLindhout commented 2 years ago

Have you installed react-native-pager-view?

SectionTN commented 2 years ago

yes I'd have it installed

SectionTN commented 2 years ago

oh, i realised that i was using react-native-pager-view@next version (6.0.0-rc or something) it had a problem with your library, I've downgraded react-native-pager-view to the stable version and you're library workes, btw you may need update your library to support the next version of react-native-pager-view@next