Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to resolve "fbjs/lib/areEqual" from "node_modules\react-native-gesture-handler\createHandler.js"

I'm building a react-native application with expo, however, I have an error, therefore I'm unable to continue building the application. I even looked for the file in node_modules that is mentioned in the error message. I'm using the react-native-gesture-handler for my screen navigation. If I uninstalled the react-native-gesture-handler and I removed the navigation code would this solve my error? How do I resolve this?

App.js

import React, { Component } from 'react';
import { StackNavigator } from 'react-navigation';
import Plan from './screens/Plan';
import Home from './screens/Home';


const AppNavigator = StackNavigator({
  PlanScreen: { screen: Home },
  HomeScreen: { screen: Plan }
});

export default class App extends Component {
  render() {
    return (
      <AppNavigator/>
    )
  }
}

Home.js

import React, { Component } from 'react';
import { View, Text, Button, TextInput } from 'react-native';
import MyDatePicker from './Components/DatePicker.js'
import ImageSelector from './Components/ImageSelector.js'

export class Home extends Component {
   constructor(props) {
    super(props);
    this.state = {text: 'input'}
   }

  render() {
    return (
      <View>
        <Text>Plan Name:</Text> 
        <TextInput style={{height: 40, borderColor: 'black', borderWidth: 0.8}}
       onChangeText={(text) => this.setState({text})}
       value={this.state.text}/>

      <Button style={{ width: 50, alignSelf: "flex-end" }}
      title="Add Plan"
      onPress={() =>
        this.props.navigation.navigate('PlanScreen')}> 
        <MyDatePicker/>
        <ImageSelector/>
        </Button>
        </View>
      )
  }
}
like image 381
SK7 Avatar asked Aug 06 '19 14:08

SK7


1 Answers

I just solved this in my project by doing npm install fbjs.

fbjs utils has the desired (and missing) "areEqual": "fbjs/lib/areEqual",

like image 182
Blundering Philosopher Avatar answered Sep 20 '22 09:09

Blundering Philosopher