Warm tip: This article is reproduced from stackoverflow.com, please click
react-native react-native-android

Unable to resolve "./GestureHandlerRootView

发布于 2020-04-13 09:32:32

I tried to create a simple route(installing all packages including this), but I get an error Unable to resolve "./GestureHandlerRootView" from "node_modules\react-native-gesture-handler\GestureHandler.js" Failed building JavaScript bundle.

import { createStackNavigator } from 'react-navigation-stack';
import { Main } from '../screens/Main';
import { createAppContainer } from 'react-navigation';

const RootStack = createStackNavigator(
  {
    Home: Main
  },
  {
    initialRouteName: 'Home'
  }
);
export const AppContainer = createAppContainer(RootStack);

and the app.js file

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { AppContainer } from './src/navigation/AppNavigation';
import { Main } from './src/screens/Main';

export default function App() {


  return <AppContainer />;
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center'
  }
});
Questioner
Лёша Сугуров
Viewed
72
Nono 2020-02-03 06:35

A new update has just been released.
Reinstall the library to get the new version 1.5.5.
It works for me.