react-native-tab-view icon indicating copy to clipboard operation
react-native-tab-view copied to clipboard

null is not an object (evaluating '_ReanimatedModule.default.configureProps')

Open muhammad-nauman opened this issue 7 years ago • 27 comments

Current behaviour

Importing is getting failed with an error while running the example code "null is not an object (evaluating '_ReanimatedModule.default.configureProps')"

Expected behaviour

It should run the example code and render the screen

Code sample

import * as React from 'react';
import { View, StyleSheet, Dimensions, StatusBar } from 'react-native';
import { TabView, SceneMap } from 'react-native-tab-view';

const FirstRoute = () => (
  <View style={[styles.scene, { backgroundColor: '#ff4081' }]} />
);
const SecondRoute = () => (
  <View style={[styles.scene, { backgroundColor: '#673ab7' }]} />
);

export default class Tab extends React.Component {
  state = {
    index: 0,
    routes: [
      { key: 'first', title: 'First' },
      { key: 'second', title: 'Second' },
    ],
  };

  render() {
    return (
      <View>
        <TabView
          navigationState={this.state}
          renderScene={SceneMap({
            first: FirstRoute,
            second: SecondRoute,
          })}
          onIndexChange={index => this.setState({ index })}
          initialLayout={{ width: Dimensions.get('window').width }}
          style={styles.container}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    marginTop: StatusBar.currentHeight
  },
  scene: {
    flex: 1,
  },
});

Screenshots (if applicable)

What have you tried

Nothing, I don't know what to do now.

Your Environment

software version
ios or android Android
react-native 0.59.8
react-native-tab-view ^2.9.0
react-native-gesture-handler ^1.3.0
react-native-reanimated ^1.1.0
node 10.15.13
npm or yarn yarn

muhammad-nauman avatar Jul 15 '19 11:07 muhammad-nauman

Please read the docs.

satya164 avatar Jul 15 '19 11:07 satya164

Please read the docs.

Obviously, I have read the docs and followed all the steps. Can you please at least reference to where I'm doing wrong?

muhammad-nauman avatar Jul 15 '19 11:07 muhammad-nauman

I have the same problem, and I have read the documentation. So would you be so kind to help us please?

IronTony avatar Jul 21 '19 14:07 IronTony

which version of tab view are you using

chakrihacker avatar Jul 26 '19 09:07 chakrihacker

If you haven't gotten it already, the step you skipped is: react-native link react-native-reanimated react-native link react-native-gesture-handler (Unless you're using react-native 0.6 or above)

AndroidDoctorr avatar Aug 06 '19 04:08 AndroidDoctorr

Hello Iron. I restart the App. react-native start --reset-cache && react-native run-android

and solve my problem.

123dma avatar Aug 06 '19 13:08 123dma

I had solved the problem by: react-native link react-native-reanimated

image

jiyouliang avatar Nov 15 '19 12:11 jiyouliang

I am getting the same problem using react-native 0.61.5

alexstoyanov avatar Nov 25 '19 11:11 alexstoyanov

@alexstoyanov Did you resolved?? Getting same error with react-native 0.61.5

shoaib2527 avatar Dec 04 '19 06:12 shoaib2527

I try

react-native link react-native-reanimated

and then

react-native start --reset-cache
react-native run-android

Works for me, good luck

DenisSokoloff avatar Dec 06 '19 07:12 DenisSokoloff

@shoaib2527 although I am using react-native 0.61.5 - I tried react-native link react-native-reanimated and it worked

alexstoyanov avatar Dec 09 '19 08:12 alexstoyanov

@shoaib2527 although I am using react-native 0.61.5 - I tried react-native link react-native-reanimated and it worked

Thanks, this actually worked strangely...

I'm confused why we have to do this since like @alexstoyanov and @shoaib2527, I am also using react-native 0.61.5 and there should be automatic linking.

plockxng avatar Jan 06 '20 03:01 plockxng

@ shoaib2527 embora eu esteja usando o react-native 0.61.5 - tentei o link react-native react-native-reanimated e funcionou

Obrigado, isso realmente funcionou estranhamente ...

Estou confuso por que temos que fazer isso, pois, como @alexstoyanov e @ shoaib2527 , também estou usando o react-native 0.61.5 e deve haver ligação automática.

Não funcionou comigo. uso o React Native 0.61.5

jaldesigner avatar Jan 13 '20 11:01 jaldesigner

if you're on react-native 60 or above, instead of running link, just add

implementation project(':react-native-reanimated')
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

to the dependencies section of your app/build.gradle

use pod install for the iOS side of things

nate-whil avatar Feb 01 '20 00:02 nate-whil

Finally, I came to the conclusion to go for native development instead of wasting time solving errors.

SumitThinktanker avatar Feb 12 '20 11:02 SumitThinktanker

@SumitThinktanker This is ridiculous. I'm tired of this crap.

ricardocosta21 avatar Feb 15 '20 01:02 ricardocosta21

If you are using react native versions greater than 0.60,

For android you can use the solution provided here: https://stackoverflow.com/questions/57878353/i-have-an-error-in-react-native-null-is-not-an-object-evaluating-reanimatedmo

This worked for me.

udaisshekhawat avatar May 11 '20 09:05 udaisshekhawat

I don't why people sharing ideas "react-native-link" as RN @0.60 linking is automatic . i have by updating my pod file in IOS pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'

and run pod install after . Thats worked for me.

Jaffarraza12 avatar Aug 24 '20 19:08 Jaffarraza12

Same issue react native 0.63.2

RamonaVint avatar Sep 01 '20 11:09 RamonaVint

u can try add modules like this

image

modules.add(new ReanimatedModule(reactContext));

karlsoft avatar Dec 07 '20 06:12 karlsoft