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

createNavigatorFactory is not a function

发布于 2020-04-10 16:17:16

I am working on my React native app using Expo and I wanted to start using a navigation that uses tabs.

I installed it using npm and now, I got this issue that appears. enter image description here

Here is my 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
}

Questioner
user11936976
Viewed
141
Michal Rada 2020-02-03 05:03

Got the same error. Got it resolved by

yarn add @react-navigation/native@next

You'll then need to wrap your app with NavigationNativeContainer as described in the docs (at the end)