gpt4 book ai didi

react-native - createNavigatorFactory 不是函数

转载 作者:行者123 更新时间:2023-12-03 19:43:01 25 4
gpt4 key购买 nike

我正在使用 Expo 开发我的 React 原生应用程序,我想开始使用使用选项卡的导航。

我使用 npm 安装了它,现在出现了这个问题。
enter image description here

这是我的 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": {
"@react-native-community/masked-view": "0.1.5",
"@react-navigation/bottom-tabs": "next",
"@react-navigation/stack": "^5.0.0-alpha.63",
"expo": "~36.0.0",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-gesture-handler": "~1.5.0",
"react-native-reanimated": "~1.4.0",
"react-native-safe-area-context": "0.6.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-web": "~0.11.7",
"react-navigation": "^4.1.0"
},
"devDependencies": {
"babel-preset-expo": "~8.0.0",
"@babel/core": "^7.0.0"
},
"private": true
}

最佳答案

得到了同样的错误。解决了

yarn add @react-navigation/native@next

然后,您需要使用 NavigationNativeContainer 包装您的应用,如 in the docs (at the end) 所述

关于react-native - createNavigatorFactory 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60021360/

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