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

Drawer Error: Cannot read property 'isConfigured' of undefined #5856

Open
Hwang-YoonJi opened this issue Apr 1, 2024 · 8 comments
Open

Drawer Error: Cannot read property 'isConfigured' of undefined #5856

Hwang-YoonJi opened this issue Apr 1, 2024 · 8 comments
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Unable to repro Wait for reply

Comments

@Hwang-YoonJi
Copy link

Description

I'm trying to use drawer navigation, but I get an error.

ERROR TypeError: Cannot read property 'isConfigured' of undefined

This error is located at:
in DrawerViewBase (created by DrawerView)
in RNGestureHandlerRootView (created by GestureHandlerRootView)
in GestureHandlerRootView (created by DrawerView)
in RNCSafeAreaProvider (created by SafeAreaProvider)
in SafeAreaProvider (created by SafeAreaProviderCompat)
in SafeAreaProviderCompat (created by DrawerView)
in DrawerView (created by DrawerNavigator)
in PreventRemoveProvider (created by NavigationContent)
in NavigationContent
in Unknown (created by DrawerNavigator)
in DrawerNavigator (created by Navigation)
in EnsureSingleNavigator
in BaseNavigationContainer
in ThemeProvider
in NavigationContainerInner (created by Navigation)
in Navigation (created by App)
in RCTView (created by View)
in View (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 safety_guide_new(RootComponent), js engine: hermes

import React from 'react';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import Home from '../screens/home';
import Settings from '../screens/settings';
import Header from '../components/Header';

const Drawer = createDrawerNavigator();
const Stack = createStackNavigator();

const HomeStack = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Home"
component={Home}
options={{
header: () =>

,
}}
/>
</Stack.Navigator>
);
};

const SettingsStack = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Settings"
component={Settings}
options={{
header: () =>

,
}}
/>
</Stack.Navigator>
);
};

const Navigation: React.FC = () => {
return (

<Drawer.Navigator>
<Drawer.Screen name="Home" component={HomeStack} />
<Drawer.Screen name="Settings" component={SettingsStack} />
</Drawer.Navigator>

);
};

export default Navigation;

<package.json>
"@react-navigation/drawer": "^6.6.15",
"@react-navigation/native": "^6.1.17",
"@react-navigation/stack": "^6.3.29",
"react": "18.2.0",
"react-native": "0.73.6",
"react-native-gesture-handler": "^2.16.0",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "^3.8.1",
"react-native-safe-area-context": "^4.9.0",
"react-native-screens": "^3.30.1",

<babel.config.js>
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};

Steps to reproduce

npm run android

Snack or a link to a repository

https://stackoverflow.com/questions/77879924/react-native-drawer-cannot-read-property-isconfigured-of-undefined-reanim

Reanimated version

3.8.1

React Native version

0.73.6

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Copy link

github-actions bot commented Apr 1, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android labels Apr 1, 2024
@szydlovsky
Copy link
Contributor

Hey @Hwang-YoonJi 👋 I tried reproducing the issue and it seems to not occur for me. Did you try rebuilding all the dependencies? (deleting the node_modules and installing dependencies again, you might even try git clean -xdf as it cleans all untracked/ignored files in the project and might take care of some troublesome caches).

@vishalsohani27
Copy link

hey, @Hwang-YoonJi
i am getting same error.
'Failed to create worklet' and 'can not read property isconfigured'
while implementing Drawer.
i have been added plugin details to babel.config.js also, please let me know, if you found any solution.

@ShahidJanAmin
Copy link

Hey, @Hwang-YoonJi
I am getting the same error. 'Cannot read property 'isConfigured' of undefined' or 'Failed to create a worklet.'
I rebuild and also cleared the cache still I face problem. If you found any solution Please shear with us.

@Dilawar4Ali
Copy link

Description

I'm trying to use drawer navigation, but I get an error.

ERROR TypeError: Cannot read property 'isConfigured' of undefined

This error is located at: in DrawerViewBase (created by DrawerView) in RNGestureHandlerRootView (created by GestureHandlerRootView) in GestureHandlerRootView (created by DrawerView) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by SafeAreaProviderCompat) in SafeAreaProviderCompat (created by DrawerView) in DrawerView (created by DrawerNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by DrawerNavigator) in DrawerNavigator (created by Navigation) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by Navigation) in Navigation (created by App) in RCTView (created by View) in View (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 safety_guide_new(RootComponent), js engine: hermes

import React from 'react'; import {createDrawerNavigator} from '@react-navigation/drawer'; import {NavigationContainer} from '@react-navigation/native'; import {createStackNavigator} from '@react-navigation/stack'; import Home from '../screens/home'; import Settings from '../screens/settings'; import Header from '../components/Header';

const Drawer = createDrawerNavigator(); const Stack = createStackNavigator();

const HomeStack = () => { return ( <Stack.Navigator> <Stack.Screen name="Home" component={Home} options={{ header: () =>

,
}}
/>
</Stack.Navigator>
);
};
const SettingsStack = () => { return ( <Stack.Navigator> <Stack.Screen name="Settings" component={Settings} options={{ header: () =>

,
}}
/>
</Stack.Navigator>
);
};
const Navigation: React.FC = () => { return ( <Drawer.Navigator> <Drawer.Screen name="Home" component={HomeStack} /> <Drawer.Screen name="Settings" component={SettingsStack} /> </Drawer.Navigator> ); };

export default Navigation;

<package.json> "@react-navigation/drawer": "^6.6.15", "@react-navigation/native": "^6.1.17", "@react-navigation/stack": "^6.3.29", "react": "18.2.0", "react-native": "0.73.6", "react-native-gesture-handler": "^2.16.0", "react-native-push-notification": "^8.1.1", "react-native-reanimated": "^3.8.1", "react-native-safe-area-context": "^4.9.0", "react-native-screens": "^3.30.1",

<babel.config.js> module.exports = { presets: ['module:@react-native/babel-preset'], plugins: ['react-native-reanimated/plugin'], };

Steps to reproduce

npm run android

Snack or a link to a repository

https://stackoverflow.com/questions/77879924/react-native-drawer-cannot-read-property-isconfigured-of-undefined-reanim

Reanimated version

3.8.1

React Native version

0.73.6

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

Noneg

Device model

No response

Acknowledgements

Yes

Hi i am also having the same issue. Installed the latest packages "@react-navigation/drawer": "^6.6.15", and "react-native-reanimated": "^3.8.1",
I did add the plugins: ["react-native-reanimated/plugin", ], in babel.config.js and also ran npm start -- --reset-cache but still there is error. Screenshot of error are attached. If @Hwang-YoonJi you found the solution please share.
error 1
error 2

@ejmdenham
Copy link

ejmdenham commented May 7, 2024

Worked for me.

  1. Delete node_modules
  2. rerun "npm install"
  3. Add >> plugins: [ "react-native-reanimated/plugin", ], to your babel.config.js (in the backets)
  4. npm start -- --reset-cache

@CarlosAlbertoTI
Copy link

Worked for me.

  1. Delete node_modules
  2. rerun "npm install"
  3. Add >> plugins: [ "react-native-reanimated/plugin", ], to your babel.config.js (in the backets)
  4. npm start -- --reset-cache

This solution didn't work for me

@TSD404
Copy link

TSD404 commented May 12, 2024

Worked for me.

  1. Delete node_modules
  2. rerun "npm install"
  3. Add >> plugins: [ "react-native-reanimated/plugin", ], to your babel.config.js (in the backets)
  4. npm start -- --reset-cache

this solution didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Unable to repro Wait for reply
Projects
None yet
Development

No branches or pull requests

8 participants