Cannot read property 'Direction' of undefined
See original GitHub issueHello,
I have just installed Pods so I can incorporate blinkid. I only started reciving this issue when I linked react-native-gesture to a podfile.
Here is my code
App.js
`/**
- Sample React Native App
- https://github.com/facebook/react-native
- @format
- @flow
- @lint-ignore-every XPLATJSCOPYRIGHT1 */
import React, {Component} from ‘react’; import {Platform, StyleSheet, Text, View} from ‘react-native’; // import store from ‘./app/store/store’ import { Provider } from ‘mobx-react’; // import {UserStore} from ‘./app/store/UserStore’ import {RootStore} from ‘./app/store/RootStore’ import NavigationService from ‘./app/navigation/NavigationService’ // const store = configuireStore({}) import RootNavigator from ‘./app/navigation/RootNavigator’ const instructions = Platform.select({ ios: ‘Press Cmd+R to reload,\n’ + ‘Cmd+D or shake for dev menu’, android: ‘Double tap R on your keyboard to reload,\n’ + ‘Shake or press menu button for dev menu’, });
type Props = {}; export default class App extends Component<Props> { render() { this.store = RootStore.create({}) return ( <Provider store={this.store}> <RootNavigator ref={navigatorRef => { NavigationService.setTopLevelNavigator(navigatorRef)}}/> </Provider> ); } }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: ‘center’, alignItems: ‘center’, backgroundColor: ‘#F5FCFF’, }, welcome: { fontSize: 20, textAlign: ‘center’, margin: 10, }, instructions: { textAlign: ‘center’, color: ‘#333333’, marginBottom: 5, }, });` RootNavigator
`import { createAppContainer, createStackNavigator } from ‘react-navigation’ import PreNavigator from ‘./PreNavigator.js’ import MainNavigator from ‘./MainNavigator’ const RootStack = createStackNavigator({ Pre: { screen: PreNavigator }, Main: { screen: MainNavigator } }, { initialRouteName: ‘Main’, headerMode: ‘none’, navigationOptions: { headerVisible: false, gesturesEnabled: true } })
export default createAppContainer(RootStack)`
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (1 by maintainers)

Top Related StackOverflow Question
It is not necessary to create a setup file as @etcaples references in her comment. The jest setup is hidden in the documentation as @andreialecu writes in issue #344
Add to “jest” in package.json:
setupFiles: [ "./node_modules/react-native-gesture-handler/jestSetup.js" ]Solved my own problem.