Reputation: 1
My react native app will not launch. Between the time it launched and didn't launch, I made no major changes, only reloading the app.
I keep getting this error:
"React Native version mismatch"
Image of the version mismatch :
I have tried looking at posts of similar nature, however none of those solutions have helped.
Occasionally, as I was installing and uninstall various versions of react native to try to fix the app, I came across this error:
"RCTView generated view config for validAttributes does not match native, missingL accessibilityTraits"
What I have tried:
Here is my packages.json file:
{
"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": {
"1.3.0": "^1.3.0",
"axios": "^0.19.0",
"expo": "^34.0.4",
"expo-web-browser": "^6.0.0",
"react": "^16.10.1",
"react-dom": "^16.8.6",
"react-native": "^0.61.1",
"react-native-elements": "^1.2.3",
"react-native-gesture-handler": "^1.4.1",
"react-native-popover-view": "^2.0.5",
"react-native-reanimated": "^1.3.0",
"react-navigation": "^4.0.10",
"react-navigation-stack": "^1.9.3",
"react-navigation-tabs": "^2.5.5"
},
"devDependencies": {
"babel-preset-expo": "^6.0.0"
},
"private": true
}
I am using WebStorm as my IDE and testing on an iPhone 7 (physical). I have tried launching the app on other devices, it did not work.
Upvotes: 0
Views: 7786
Reputation: 1
your version is miss matching in your package.json
file,
to overcome this problem use the following commands:-
if you are working with npm globally, then use:-
npm i -g npm-check-updates
then,
ncu -u && npm install
ncu -u
shows you which version has updated to which version,
screenshot of output of ncu -u
For a specific root folder/project use can use:-
npx npm-check-updates -u && npm i
then,
ncu -u && npm install
Upvotes: 0
Reputation: 1503
try running this command in your project directory
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
Upvotes: 2