question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'Direction' of undefined

See original GitHub issue

Hello, 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. screen shot 2019-03-04 at 4 45 29 pm Here is my code App.js `/**

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:closed
  • Created 5 years ago
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

53reactions
lissaucommented, Jun 4, 2019

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" ]

43reactions
ajboxjrcommented, Mar 4, 2019

Solved my own problem.

  1. Right Click Libraries “Add Files to Project”
  2. /node_modules/react-native-gesture-handlers/ios/RNGestureHandler.xcodeproj
  3. Go to build phases and add libRNGestureHandler.a
  4. Run
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'Direction' of undefined, tests only
... Cannot read property 'Direction' of undefined at Object.Direction (node_modules/react-native-gesture-handler/Directions.js:3:39) at ...
Read more >
Cannot read property 'Direction' of undefined #5687 - GitHub
Had same problem. In RN 0.60 do not link manually. There is auto-linking. Actually unlink if you have linked (as suggested by manual)....
Read more >
Cannot read property "Direction" of undefined - Comma
Notes from a front-end developer. React, ReactNative, JavaScript, CSS, HTML5, babel, ES6 and so on.
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
error handling response: typeerror: cannot read properties of ...
Your issue is that your .find() method is returning undefined , so you can't access properties on product such as .name as it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found