"RNSScreen" was not found in the UIManager - Expo Dev Client - reactjs

Following the official blog post, I've recently upgraded my Expo-managed project to Expo 47 (from version 45). I've built a custom dev client for my application and installed it on my Android emulator. I'm now trying to open it with npx expo start --dev-client, but I get an error Invariant Violation: requireNativeComponent: "RNSScreen" was not found in the UIManager.
I've also tried to start the without dev client (npx expo start) and it works, but obviously, it can't run some native code. I'm using React Navigation, and yes, I have the React Native Screens (~3.18.0) library installed.
Is there a way to fix it for the dev client build?

Related

Is it possible to get rid of expo completely

I'm using react native expo 47 and I wanted to eject from expo to have native modules for ios and android to use my native code or 3rd libraries. But on 47 sdk expo there is no eject. Instead it I could make prebuild which generated for me native folders for ios and android. But when i want to use any library which use native code i have exception that its not defied sdk in gradle etc. How to get rid of expo completely and use react native cli? There is way to migrate from expo to cli without any expo requirements?
I remember that in older expo sdk it was eject prcess which allow you to do whatever you want in project. I want to achieve the same solution.
I want to migrate from expo to react native cli with no expo dependencies and rules, to work with native codes.

React Native build vs expo ejected build

Can anyone answer my question!
1: I have an expo-ejected project. I have installed some react-native libraries in it .when I try to create a build using the expo server then it is building fine but when I try to build it Xcode it shows an error?
2: Does expo generated build includes react-native libraries . As it does not show errors when building using the expo server .but shows an error when trying to create a build locally i.e(Xcode or Android Studio)
Trying to create build but error

Facing problem in using tensorflow (js) in react native cli (not in expo cli)

When ever i install the dependencies of tensorflow in react native cli and do number of changes in android files even then the app doesn't run due to some issue in #unimodules/react-native-adapter . Does anyone know the right way to work with tensorflow in react native cli (not in expo cli)

React-Devtools discontinued or just moved? (React Native debugging)

I started with React Native today and I downloaded react-devtools from npm repo to debug Components hiearchy of React Native Expo app. It works fine, but it crashing sometimes.
Thats why I tried to search for some new version or something and I found, that GitHub repo of this project no longer exists (https://github.com/facebook/react-devtools) and was moved to (https://github.com/facebook/react). I dont understand where I can now found this tool in main React repo? Or project is discontinued? Are there some equivalents? Am I using some Legacy version?
Even debugged in browser (http://localhost:19001/debugger-ui/) telling me to download this app from non-existing repo.
Are there some equivalents?
I have been using reactotron for the need of devtools. This tool has way more options than devtools and the guide to install can be found here
https://github.com/infinitered/reactotron/blob/master/docs/quick-start-react-native.md

React native EXPO installation (npm start)

I created my app in react native using Expo but when i run the npm start command its showing me this:
running metro bundler on port 8081
and then
loading dependency graph, done
and never end. what to do?
Here is the complete console output.
First of all if you have a bundler like the one that you have used then it would suggest that you have used react-native init to create you application, instead of expo.
Expo bunders look like this:
If you have created a react-native init and as it suggests in your screenshot that you are building the app on a Windows machine, that means you will be developing on Android.
The instructions for using Android and running react-native are quite long and complicated, they can be found here. For the sake of brevity I am not going to repeat them here asyou can just follow this link. Make sure to choose Building Projects with Native Code -> Development OS: Windows -> Target OS: Android to find the instructions that are pertinent to your situation.
https://facebook.github.io/react-native/docs/getting-started.html
If you are planning on developing on an emulator then you will need to make sure that you have one installed (the link above has all the info that you need). Also you need to make sure that you launch your emulator before running react-native run-android if you do that then it should load on to the emulator and you should be able to see what you are developing on.
If you want to run on your own Android device then you should follow the instructions on this page https://facebook.github.io/react-native/docs/running-on-device (again choosing the options for your situation).
Expo
If this feels like too much effort, you can always try Expo. It doesn't require you to be able to deal with native code. And depending on your use case can be a better option than creating a project with react-native init, plus you can always eject from the expo project and turn it in to a full fledged react-native app.
You install the expo-cli with
npm install -g expo-cli
Then download the expo app from the App Store or the Google Play Store (depending on the mobile that you are using).
Then you can use
expo init
to create your application
Check out the expo documentation for more information https://docs.expo.io/versions/v32.0.0/workflow/up-and-running
Well, Nice question, First of all, I totally understand what's exactly your problem is, let me give you a solution in a very appropriate way.
Basically, there is two way to install and setup React Native Project on your mac and windows machines
1st React Native (native) Method: (That's basically you're using right know
Note: If you're using Apple product - Like MacBook then you can do IOS and Android both platform by using this method, if you're using Windows or Linux you can only do this part for Android platforms
In this method, we have to follow these simple steps
Download Nodejs from Offical website link here
Installing the React Native Cli
npm install -g react-native-cli
If you get an error like Cannot find module 'npmlog', try installing npm directly: curl -0 -L https://npmjs.org/install.sh | sudo sh.
(Only for mac)
Install the Xcode from Appstore (Only for Mac user/macos users)
otherwise
download and install the Android Studio (Stable version) from the official website of Android studio
Setup Xcode (Simulator) or Setup Android Studio for Android devices use (emulator)
by learn and guide from this link here
Note: Basically in your scenario, I'm pretty sure you didn't set up your emulator for android and simulator for IOS that's why you didn't see anything after
2nd React Native with Expo Method: that's you're not using a loading dependency graph
Use
For Android
react-native run-android
For IOS
react-native run-ios
2nd React Native without Expo (that's not your case):
In this method, we have to follow these simple steps
Download Nodejs from Offical website link here
installing expo cli
npm install -g expo-cli
expo init yourprojectname
cd yourprojectname
npm start
Note: Simulators and emulators way same for both

Resources