gpt4 book ai didi

react-native - 无法从 "fbjs/lib/areEqual"解析 "node_modules\react-native-gesture-handler\createHandler.js"

转载 作者:行者123 更新时间:2023-12-02 02:10:28 26 4
gpt4 key购买 nike

我正在使用 expo 构建一个 react native 应用程序,但是,我遇到了错误,因此我无法继续构建该应用程序。我什至在错误消息中提到的node_modules 中查找了文件。我正在使用 React-native-gesture-handler 进行屏幕导航。如果我卸载了react-native-gesture-handler并删除了导航代码,这会解决我的错误吗?我该如何解决这个问题?

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>
)
}
}

最佳答案

我刚刚在我的项目中通过执行npm install fbjs解决了这个问题。

fbjs utils 具有所需(且缺失)的 "areEqual": "fbjs/lib/areEqual",

关于react-native - 无法从 "fbjs/lib/areEqual"解析 "node_modules\react-native-gesture-handler\createHandler.js",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57377848/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com