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

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

Related

Some dependencies are incompatible with the installed expo package version

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?

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

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.

errors after running expo start

I have installed latest node version and expo-cli but when I run the command expo start, it gives me this error:
Starting project at C:\Users\Ogacho\Desktop\sharelocation
Expo DevTools is running at http://localhost:19002
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
Opening DevTools in the browser... (press shift-d to disable)
Error: React Native is not installed. Please run `npm install` in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
I have tried clearing my npm cache, deleting my node_modules folder and reinstalling...
This fixed it for me:
Run expo update 35.0.0. (Replace version with your desired version. 35.0.0 is the latest as of this post.) This updates expo, by updating app.json & package.json and installing the latest dependencies.
Referenced from:
https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough/
Also, check that:
your expo app is the latest version through the app/play store.
your expo cli is the latest version npm install -g expo-cli
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older. If your expo-cli version is older than 2.21.2, run npm install -g expo-cli to get the latest version.
Or, you can change sdkVersion and dependencies to an older version to match the expo-cli doc.Run expo --version to get the expo-cli version. For example, if using expo-cli 2.19.5, you should
app.json, change sdkVersion to "32.0.0",
In package.json, change these dependencies:
{
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"expo": "^32.0.0",
"react": "16.5.0"
}
Delete your project’s node_modules directory and install again
Close your Expo CLI server
Run expo upgrade in your project directory (requires the latest version of expo-cli, you can update with npm i -g expo-cli).
Make sure to check the breaking changes section of this post!
Run expo start -c

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.