React Native 0.59.1 Version Mismatch
See original GitHub issue🐛 Bug Report
So I upgraded to react-native:0.59.1
from react-native:0.57.5
and every time I do react-native run-android
it builds successfully but I get this error.
What I have already tried:
- Remove
app/build
folder - Run
.\gradlew clean
- Run
react-native start --reset-cache
- Delete
node_modules
folder and runyarn
- Tried all the below steps with npm as well.
Screenshot:
To Reproduce
I did the following steps to upgrade to 0.59.1
:
yarn add react-native@latest
react-native upgrade --legacy
(did yes or no appropriately)- Remove the node_modules folder
yarn
- Run
react-native run-android
Expected Behavior
The app should build and run without a version mismatch error.
Code Example
My package.json:
{
"name": "scrittori",
"version": "0.1.0",
"private": true,
"rnpm": {
"assets": [
"./src/assets/Fonts/"
]
},
"devDependencies": {
"@babel/core": "^7.1.5",
"@babel/preset-flow": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-preset-react-native-stage-0": "^1.0.1",
"eslint": "^5.9.0",
"eslint-config-google": "^0.10.0",
"jest": "^23.5.0",
"jest-react-native": "^18.0.0",
"metro-react-native-babel-preset": "^0.48.3",
"react-test-renderer": "16.5.2"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"test": "jest"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/runtime": "^7.1.5",
"core-js": "^2.5.7",
"install": "^0.12.2",
"moment": "2.22.2",
"native-base": "^2.12.1",
"prop-types": "^15.6.2",
"react": "16.8.3",
"react-native": "^0.59.1",
"react-native-animatable": "^1.3.0",
"react-native-clear-app-cache": "^1.0.4",
"react-native-dialogs": "^1.0.2",
"react-native-elements": "^1.0.0-beta7",
"react-native-firebase": "^5.1.0",
"react-native-git-upgrade": "^0.2.7",
"react-native-image-crop-picker": "^0.21.3",
"react-native-image-resizer": "^1.0.0",
"react-native-linear-gradient": "^2.4.3",
"react-native-modal-filter-picker": "^1.3.4",
"react-native-navigation": "https://github.com/theweavrs/react-native-navigation/tarball/master",
"react-native-popup-menu-android": "^1.0.3",
"react-native-progress": "^3.5.0",
"react-native-share": "^1.1.3",
"react-native-simple-dialogs": "^1.0.0",
"react-native-swipe-view": "^3.0.1",
"react-native-timeago": "^0.4.0",
"react-native-vector-icons": "^6.2.0",
"react-native-view-more-text": "^2.0.1",
"react-native-view-shot": "^2.5.0",
"react-redux": "^5.1.0",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"redux-thunk": "^2.3.0",
"sync-storage": "^0.3.0"
}
}
Environment
React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 5.07 GB / 15.89 GB
Binaries:
Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5264788
Issue Analytics
- State:
- Created 5 years ago
- Comments:23 (4 by maintainers)
Top Results From Across the Web
React Native version mismatch - Stack Overflow
The "JavaScript version 0.50.1" in the error console is the react-native version in your package.json file. Make sure it is the same version...
Read more >How to Fix a React Native Version Mismatch Quickly - Waldo
A well-working solution involves removing all your dependencies and cache from your project and generating your Android and iOS builds again.
Read more >"React Native version mismatch" errors - Expo Documentation
When developing an Expo or React Native app, it's not uncommon to run into an error that looks like: React Native version mismatch....
Read more >How to fix React Native version mismatch - DEV Community
To fix this just do the following. 1). Open package.json. 2). Change this line. "react-native": "^0.61.4",. to reflect the new version.
Read more >iOS : React Native version mismatch 0.59.1 0.61.2 - YouTube
iOS : React Native version mismatch 0.59.1 0.61.2 [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS : React Native ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My way is close terminal and run again!this is solve
try react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/