BugiDev / react-native-calendar-strip

Easy to use and visually stunning calendar component for React Native.
MIT License
958 stars 329 forks source link

Enable scrollable prop crash the app #364

Closed Uzef1997 closed 1 year ago

Uzef1997 commented 1 year ago

Package.json

{
  "name": "WFS_APP",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/netinfo": "^9.3.7",
    "@react-navigation/bottom-tabs": "^6.5.2",
    "@react-navigation/native": "^6.1.1",
    "@react-navigation/native-stack": "^6.9.7",
    "@reduxjs/toolkit": "^1.9.1",
    "axios": "^1.2.1",
    "babel-cli": "^6.26.0",
    "i18next": "^22.4.6",
    "lottie-ios": "3.4.0",
    "lottie-react-native": "^5.1.4",
    "moment": "^2.29.4",
    "patch-package": "^6.5.0",
    "react": "18.1.0",
    "react-i18next": "^12.1.1",
    "react-native": "0.70.6",
    "react-native-asset": "^2.0.1",
    "react-native-calendar-strip": "^2.2.6",
    "react-native-calendars": "^1.1293.0",
    "react-native-device-info": "^10.3.0",
    "react-native-flash-message": "^0.3.1",
    "react-native-keyboard-manager": "^6.5.4-4",
    "react-native-modal": "^13.0.1",
    "react-native-raw-bottom-sheet": "^2.2.0",
    "react-native-safe-area-context": "^4.4.1",
    "react-native-screens": "^3.18.2",
    "react-native-sqlite-storage": "^6.0.1",
    "react-native-vector-icons": "^9.2.0",
    "react-redux": "^8.0.5"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "0.72.3",
    "react-test-renderer": "18.1.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

source code:-

<CalendarStrip
    scrollable
    scrollerPaging={true}
    calendarAnimation={{ type: 'parallel', duration: 30 }}
    daySelectionAnimation={{ highlightColor: 'red', type: 'background', duration: 200, borderWidth: 1, borderHighlightColor: theme.colors.primary, backgroundColor: 'red' }}
    style={{
        height: 120,
        marginTop: 10,
        borderRadius: 20
    }}
    calendarColor={'white'}
    calendarHeaderStyle={{ color: theme.colors.primfsary, ...fontBold16, marginTop: 10, }}
    dateNumberStyle={{ color: theme.colors.primary, ...fontReg14 }}
    dateNameStyle={{ color: theme.colors.primary, ...fontBold12, marginTop: -10, }}
    highlightDateNumberStyle={{ color: theme.colors.primary, ...fontReg14 }}
    highlightDateNameStyle={{ color: theme.colors.primary, ...fontBold12 }}
    disabledDateNameStyle={{ color: 'grey' }}
    disabledDateNumberStyle={{ color: 'grey' }}
    // datesWhitelist={datesWhitelist}
    // datesBlacklist={datesBlacklist}
    // iconLeft={require('./img/left-arrow.png')}
    // iconRight={require('./img/right-arrow.png')}
    iconContainer={{ flex: 0.1 }}
/>

Error Log:-

Error: Requiring unknown module "undefined". If you are sure the module exists, try restarting Metro. You may also want to run `yarn` or `npm install`., js engine: hermes 
    at CalendarScroller (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:134157:36)
    at RCTView
    at View
    at RCTView
    at View
    at RCTView
    at View
    at RCTView
    at View
    at CalendarStrip (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:133264:36)
    at RCTView
    at View
    at RCTView
    at View
    at RCTSafeAreaView
    at RCTView
    at View
    at AppSafeAreaView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:92642:41)
    at TimeCard (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:128225:86)
    at StaticContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100979:17)
    at EnsureSingleNavigator (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:97258:24)
    at SceneView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100890:22)
    at RCTView
    at View
    at RCTView
    at View
    at Background (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:102672:21)
    at Screen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103603:108)
    at RNSScreen
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:78065:38)
    at AnimatedComponentWrapper
    at Suspender (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:104311:22)
    at Suspense
    at Freeze (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:104330:23)
    at DelayedFreeze (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103809:22)
    at InnerScreen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103850:36)
    at Screen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:104015:36)
    at MaybeScreen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103705:24)
    at RNSScreenNavigationContainer
    at ScreenContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103954:31)
    at MaybeScreenContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103693:23)
    at RNCSafeAreaProvider
    at SafeAreaProvider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:102336:24)
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103562:25)
    at BottomTabView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:94873:30)
    at PreventRemoveProvider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100021:25)
    at NavigationContent (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100713:22)
    at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100725:27)
    at BottomTabNavigator (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:94771:18)
    at EnsureSingleNavigator (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:97258:24)
    at BaseNavigationContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:96865:28)
    at ThemeProvider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:101765:21)
    at NavigationContainerInner (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:101658:26)
    at AppNavigation (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:92250:44)
    at Provider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:93043:21)
    at App
    at RCTView
    at View
    at RCTView
    at View
    at AppContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:84066:36)
    at WFS_APP(RootComponent) (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:88617:28)
 ERROR  Error: Requiring module "node_modules/recyclerlistview/dist/reactnative/index.js", which threw an exception: Error: Requiring unknown module "undefined". If you are sure the module exists, try restarting Metro. You may also want to run `yarn` or `npm install`., js engine: hermes 
    at CalendarScroller (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:134157:36)
    at RCTView
    at View
    at RCTView
    at View
    at RCTView
    at View
    at RCTView
    at View
    at CalendarStrip (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:133264:36)
    at RCTView
    at View
    at RCTView
    at View
    at RCTSafeAreaView
    at RCTView
    at View
    at AppSafeAreaView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:92642:41)
    at TimeCard (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:128225:86)
    at StaticContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100979:17)
    at EnsureSingleNavigator (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:97258:24)
    at SceneView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100890:22)
    at RCTView
    at View
    at RCTView
    at View
    at Background (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:102672:21)
    at Screen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103603:108)
    at RNSScreen
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:78065:38)
    at AnimatedComponentWrapper
    at Suspender (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:104311:22)
    at Suspense
    at Freeze (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:104330:23)
    at DelayedFreeze (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103809:22)
    at InnerScreen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103850:36)
    at Screen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:104015:36)
    at MaybeScreen (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103705:24)
    at RNSScreenNavigationContainer
    at ScreenContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103954:31)
    at MaybeScreenContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103693:23)
    at RNCSafeAreaProvider
    at SafeAreaProvider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:102336:24)
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:103562:25)
    at BottomTabView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:94873:30)
    at PreventRemoveProvider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100021:25)
    at NavigationContent (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100713:22)
    at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:100725:27)
    at BottomTabNavigator (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:94771:18)
    at EnsureSingleNavigator (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:97258:24)
    at BaseNavigationContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:96865:28)
    at ThemeProvider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:101765:21)
    at NavigationContainerInner (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:101658:26)
    at AppNavigation (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:92250:44)
    at Provider (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:93043:21)
    at App
    at RCTView
    at View
    at RCTView
    at View
    at AppContainer (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:84066:36)
    at WFS_APP(RootComponent) (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.evosys.enersense:88617:28)
 ERROR  TypeError: Cannot read property 'DataProvider' of undefined

This error is located at:
    in CalendarScroller (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in CalendarStrip (created by TimeCard)
    in RCTView (created by View)
    in View (created by TimeCard)
    in RCTView (created by View)
    in View (created by AppSafeAreaView)
    in RCTSafeAreaView (created by AppSafeAreaView)
    in RCTView (created by View)
    in View (created by AppSafeAreaView)
    in AppSafeAreaView (created by TimeCard)
    in TimeCard (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by BottomTabView)
    in RCTView (created by View)
    in View (created by Screen)
    in RCTView (created by View)
    in View (created by Background)
    in Background (created by Screen)
    in Screen (created by BottomTabView)
    in RNSScreen (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (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 BottomTabView)
    in RNSScreenNavigationContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by BottomTabView)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by BottomTabView)
    in BottomTabView (created by BottomTabNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by BottomTabNavigator)
    in BottomTabNavigator (created by AppNavigation)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by AppNavigation)
    in AppNavigation (created by App)
    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 WFS_APP(RootComponent), js engine: hermes
 ERROR  TypeError: Cannot read property 'DataProvider' of undefined

This error is located at:
    in CalendarScroller (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in RCTView (created by View)
    in View (created by CalendarStrip)
    in CalendarStrip (created by TimeCard)
    in RCTView (created by View)
    in View (created by TimeCard)
    in RCTView (created by View)
    in View (created by AppSafeAreaView)
    in RCTSafeAreaView (created by AppSafeAreaView)
    in RCTView (created by View)
    in View (created by AppSafeAreaView)
    in AppSafeAreaView (created by TimeCard)
    in TimeCard (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by BottomTabView)
    in RCTView (created by View)
    in View (created by Screen)
    in RCTView (created by View)
    in View (created by Background)
    in Background (created by Screen)
    in Screen (created by BottomTabView)
    in RNSScreen (created by AnimatedComponent)
    in AnimatedComponent
    in AnimatedComponentWrapper (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 BottomTabView)
    in RNSScreenNavigationContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by BottomTabView)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by SafeAreaInsetsContext)
    in SafeAreaProviderCompat (created by BottomTabView)
    in BottomTabView (created by BottomTabNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by BottomTabNavigator)
    in BottomTabNavigator (created by AppNavigation)
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner (created by AppNavigation)
    in AppNavigation (created by App)
    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 WFS_APP(RootComponent), js engine: hermes

Error SS:- simulator_screenshot_0E429E64-AC0D-4F9D-B200-40A7E900C8D2

Uzef1997 commented 1 year ago

Installing recyclerlistview solved the issue

yarn add recyclerlistview