Some dependencies are incompatible with the installed expo package version - react-native

Hello I am learning expo for react Native and while running my app i get the error below. My app runs fine but i just want to get rid of the error.
is there something like npm update i can do to get rid of this error
here is the error:
Some dependencies are incompatible with the installed expo package version:
#react-native-picker/picker - expected version: 2.4.0 - actual version installed: 2.4.2
react-native-safe-area-context - expected version: 4.2.4 - actual version installed: 4.3.1
react-native-screens - expected version: ~3.11.1 - actual version installed: 3.13.1
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
or install individual packages by running expo install [package-name ...]

actually this does the trick
expo doctor --fix-dependencies

It appears to be that the expected version of some of your installed libraries are lower than the actual versions that you installed. You need to downgrade your dependencies to match the expected version to get rid of the warnings.
First you will need to uninstall the above packages by the command: npm uninstall [library-name]. For example: npm uninstall react-native-screens
After that, you will need to reinstall the above libraries using their recommended version: mpn install react-native-screens#3.11.1
You can also refer to this for more information: How do I down grade my react navigation in a current react-native project?

Related

problem with expo react native navigation

i am using react-native with expo to run my app on my android devices when i load my app on my terminal i have this error
Some dependencies are incompatible with the installed expo package version:
#react-native-community/masked-view - expected version: 0.1.10 - actual version installed: 0.1.11
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
Missing package "metro-config" in the project at: C:\Users\kabore\Desktop\react_native\app1
This usually means react-native is not installed. Please verify that dependencies in package.json include "react-native" and run yarn or npm install.
Error: Missing package "metro-config" in the project at: C:\Users\kabore\Desktop\react_nativ
simply remove the node_modules folder and run yarn install or npm install in the command line to install dependencies again .it seems like some of your dependencies are not installed correctly

recently i updated my expo-cli to version 3.13.1 and all of a sudden the applications are not working

after updating expo-cli to 3.13.1 , when i start the application i get errors .
on npm start
- Some of your project's dependencies are not compatible with currently installed expo package version: - react-native-safe-area-context - expected version range: 0.6.0 - actual version installed: ^0.7.3 Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
if i install react-native-safe-area-context#0.6.0 , it gives the following error
Unable to resolve "./InitialWindowSafeAreaInsets" from "node_modules\react-native-safe-area-context\src\index.tsx
before updating it was working fine .
Seems like you're installing it with npm. You should install it with Expo:
expo install react-native-safe-area-context

Cannot find module 'expo/bundleNativeModules.json'

I'm using expo to build an app. I'm new to React-Native and expo so if you could help me, I'd be really appreciated.
I get a couple of warnings that says:
Some of your project's dependencies are not compatible with currently installed expo package version
- expo-constants - expected version range: ...
- expo-permissions - expected version range: ...
- react-native-gesture-handler - expected version range: ...
Your project may not work correctly until you install the correct versions of the packages.
I was facing another error:
"TypeError: TypeError: undefined is not an object (evaluating '_styles.default.list')".
So I'm trying to install the latest version.
When I try to install expo install expo-permissions and expo install react-native-gesture-handler, I get errors.
Both errors say
Cannot find module 'expo/bundledNativeModules.json'
Require stack:
- /Users/address/src/react-native-udacicards/noop.js
I tried to remove node_modules and package-lock.json then npm install.
rollback with npm install -g expo-cli#2.4.3
I don't know if this solution will work for all the situations, but this is what fixed the issue it for me:
clean the npm cache using the following command : npm cache clean --force
re-install the dependencies : npm install
expo install
I hope it helps
1.on your package.json change expo version to
"expo": "~43.0.2", (or lower)
and your react-native-gesture-handler to
"react-native-gesture-handler": "~1.10.2",
(for expo 43.0.2)
Then, on your terminal (in your project), run
npm cache clean --force
npm install
expo doctor --fix-dependencies
I also faced this issue but Enableing USB tethering in phone, and clearing all data in expo app resolved this issue.

popup-menu requires RN 0.55+ error in react native

I am using the library "react-native-popup-menu.
npm install react-native-popup-menu#0.14.0
version:0.14.0(it's latest)
when I try to run then error showed: this version of popup-menu requires RN 0.55+
but the problem was I install the latest library then why to get an error?
NOTE: added a library in Package.Json file.
You should install 0.9 version of react-native-popup-menu. Last version is not compatible with your react-native version.
You should install it on your root folder like below:
npm install --save react-native-popup-menu#0.9
more info: https://github.com/instea/react-native-popup-menu#react-native-compatibility

React Native - Can not create new project via react-native-cli when react-native version is > 0.55

I am trying to create new project via react native project via react-native-cli react-native init ProjectName and get the following error
error Found incompatible module info
Visit https://yarnpkg.com/en/docs/cli/add for documentation about this
Error: Command failed: yarn add react-native --exact
Project can be created with the same command when react native version is less then or equal to 0.54
react-native init ProjectName --version react-native#0.54
The following links also did not helped me.
https://github.com/facebook/react-native/issues/14861
https://github.com/yarnpkg/yarn/issues/3227
I solve the problem just moment.
the reason is node version problem.
you can install >10.0 node.
then, react-native init project succeed.
I came across similar issue. Following are the steps I took to solve it.
Noticed the yarn error occurs due to incompatible node module version. It required node version >= 8.0. For this, I changed the node version using nvm:
nvm use 8.0.0
Note: Check first if you have a installed node version >= 8.0 using nvm list. If yes, just use the above command. Otherwise install it by nvm install v8.0.0.
After this, you might come across similar error for npm. I did not have updated npm version. Install latest npm by npm install -g npm#latest
Try to create new react-native project, react-native init HelloWorld.