我正在使用expo构建一个react-native应用程序,并且正在使用react native导航库在页面之间导航并将我的按钮链接到下一页,但是我收到了错误消息。我需要做些什么更改才能使页面显示起来并获得链接到第二页的按钮(在主页上)?
错误:无法从“ node_modules \ react-native-gesture-handler \ createHandler.js”解析“ fbjs / lib / areEqual”。 更新:现在也支持此错误:无法从“ screens \ Home.js”总线解析“ ./Components/DatePicker.js”,是否有可能与datePicker不相关?我认为这与react-native-gesture-handler有关。如果我使用EXPO导航到不同的屏幕,是否需要专门针对Android进行任何操作?
AppNavigator.js
import { createStackNavigator } from 'react-navigation';
import Home from './screens/Home';
import Plan from './screens/Plan'
const AppNavigator = createStackNavigator({
Home: { screen: Home },
Plan: { screen: Plan},
});
export default AppNavigator;
App.js
import React from 'react';
import AppNavigator from './AppNavigator';
export default class App extends React.Component {
render() {
return (
<AppNavigator/>
);
}
}
Package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@unimodules/react-native-adapter": "^3.0.0",
"deep-equal": "^1.0.1",
"expo": "^34.0.1",
"expo-constants": "~6.0.0",
"expo-image-picker": "~6.0.0",
"expo-permissions": "~6.0.0",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"react-native-calendar-select": "^0.1.2",
"react-native-datepicker": "^1.7.2",
"react-native-gesture-handler": "^1.3.0",
"react-native-image-picker": "^1.0.2",
"react-native-unimodules": "^0.5.3",
"react-native-web": "^0.11.4",
"react-navigation": "^3.11.1"
},
"devDependencies": {
"babel-preset-expo": "^6.0.0"
},
"private": true
}