React-native-Navigation-Stack Version && dependency error - react-native

can somebody help me with the navigation stack dependency error Ipackage.json file am very new to react tried so many dependencies but still getting the attached error
Terminal error
I am attaching your recommended changes changes I made..
then when Ithe error tried installing the masked-view it showed me this

You have to install the necessary libraries required for react-navigation below are the mentioned npm library you need to install
Install all the red marked libraries and also do cd ios pod install and you are good to go.
You only have to install the following libraries
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view
for navigation.
Remove react-navigation/core , react-navigation/router library which you have added extra.

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

expo install vs npm install

I'm just getting started with Expo -- but I've done RN development using the CLI. One of the first things I noticed is that I am supposed to install third party packages using expo install <package-name> so that we know the package is compatible.
However, I just noticed that even though Expo recommends React Navigation for navigation and routing, the first step in installing it is npm install #react-navigation/native. We then continue with expo install for installing Expo dependencies. Here's the instructions: https://reactnavigation.org/docs/getting-started/
I'm a bit confused here. I thought we weren't supposed to use npm install with Expo. What am I missing? Why are we using npm install for the React Navigation package and not expo install?

Why Material Top Tabs could not be found even though I installed it? (React Native)

I installed the Material Top Tab library and I imported it on the project but it occurs me an error it says:
"#react-navigation/material-top-tabs" could not be found within the project or in these directories:
..\node_modules#react-native
I don't know what the error is!
Before installing
npm install #react-navigation/material-top-tabs react-native-tab-view react-native-pager-view
I installed
npm install react-native-screens react-native-safe-area-context
And after that I reinstalled npm install #react-navigation/material-top-tabs react-native-tab-view react-native-pager-view and it worked.

React native compile error on resolving module

I can't compile my project because of this error.
Unable to resolve module #react-navigation/core from
node_modules\#react-navigation\native\src\createAppContainer.js:
When I run I encounter with this problem. Can anybody help me?
Sometimes such error occurs as the package-json.lock file which locks the version.
So do 1 thing remove the version of #react-navigation and all related dependencies from your package.json and after that do following once again
npm install #react-navigation/native --save
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view --save
Must help!
This error means that either you haven't installed the react-navigation module or that you have installed the module but didn't re-built your project using react-native run-android or react-native run-ios.
Following these steps should solve your issue:
Install react-navigation module.
Re-build your project.
Restart the packager by stopping the current packager and then
starting the packager again
with react-native start.

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.