0

Running my project on expo and I keep getting this error that there is a React Native version mismatch:

Here is a screenshot of the error

So I went into my package.json file to review what was going on and it turns out that my react-native version matches the JS version. here it is

{
"name": "PTP",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest"
    },
    "dependencies": {
        "moment": "^2.24.0",
        "prop-types": "^15.6.2",
        "react": "16.6.3",
        "react-dom": "^16.8.1",
        "react-native": "^0.60.5",
        "react-native-elements": "^1.1.0",
        "react-native-gesture-handler": "^1.0.15",
        "react-native-image-picker": "^0.28.0",
        "react-native-keyboard-aware-scroll-view": "^0.8.0",
        "react-native-loading-spinner-overlay": "^1.0.1",
        "react-native-picker-select": "^6.1.0",
        "react-native-simple-toast": "0.0.8",
        "react-native-vector-icons": "^6.2.0",
        "react-navigation": "^2.0.0",
        "react-redux": "^6.0.0",
        "redux": "^4.0.1",
        "redux-logger": "^3.0.6",
        "redux-persist": "^5.10.0",
        "redux-promise": "^0.6.0",
        "redux-thunk": "^2.3.0"
    },
    "devDependencies": {
        "babel-core": "7.0.0-bridge.0",
        "babel-jest": "24.0.0",
        "jest": "24.0.0",
        "metro-react-native-babel-preset": "0.51.1",
        "react-test-renderer": "16.6.3"
    },
    "jest": {
        "preset": "react-native"
    },
    "rnpm": {
        "assets": [
            "./assets/Fonts/Fonts/"
        ]
    }
}

is there something I am overlooking? I looked up what other people have done to solve this issue, but upon further research their react-native version indeed did not match. So I'm quite confused right now

Frank Gully
  • 267
  • 1
  • 8
  • 19
  • Have you rebuilt and redeployed the apk on the device/emulator you're testing on? Sometimes after an upgrade the old apk will still be hanging around on testing devices which then connects to the metro bundler serving the new react native javascript. – azundo Sep 24 '19 at 23:27
  • yes, I even tried publishing the project onto expo, yet I get an error as such `Unhandled JS Exception: null is not an object (evaluating 't.SHORT')` which I sense is the same issue – Frank Gully Sep 24 '19 at 23:37
  • It's look like you run expo with react-native and other packages versions that are not from expo template project. I recommended to create new expo project and look at structure of it: expo init projectname. First of all you will see that the react-native of expo has another source location. – Oleg Sep 25 '19 at 02:47
  • Close all terminals and run build again. – Rizwan Ahmed Shivalli Sep 25 '19 at 06:18

0 Answers0