Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

undefined is not a function (evaluating '_this._registerEvents()')

After i deleted my src folder in order to refactor this error occurred. I believe this is a caching issue? I tried following this gist but no luck.

"react": "16.4.1",

"react-native": "0.56.1",

"@babel/core": "^7.1.2",

"presets": ["react-native"]

`

import React, { Component } from 'react';
import { Platform, Text, View } from 'react-native';
import { Provider } from 'react-redux';
import { store } from './src/redux/store';


export default class App extends Component<Props> {
    state = {
        isLoadingComplete: false,
    };

    render() {
        return (
            
            <View>
                <Text>Hello??</Text>
                <Text>Hello??</Text>
                <Text>Hello??</Text>
                <Text>Hello??</Text>
                <Text>Hello??</Text>
                <Text>Hello??</Text>
                <Text>Hello??</Text>
            </View>
        );
    }
}

`

like image 687
iseri Avatar asked Oct 09 '18 03:10

iseri


1 Answers

Open your terminal/CMD/shell and run these commands one after another

cd yourProjectDiectory  ----> navigate to your project directory

watchman watch-del-all

rm -rf node_modules/.cache

react-native start --resetCache
like image 126
Mahgol Fa Avatar answered Sep 21 '22 10:09

Mahgol Fa