Updating react-native packages still gives 'deprecated ViewPropTypes' error - react-native

I am working on upgrading a react-native application from v0.60 to v0.70.
I have updated all the packages to the latest but after building the app successfully, I am getting a white screen when the app is launching on the emulator. In the terminal it is giving the error -
"Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'., js engine: hermes"
I tried to see if there are any ViewPropTypes being used in my node_modules and I updated all the third-party packages using them. Still, I am getting the same error.
screenshot
Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'., js engine: hermes

Related

react-native-fs not working on react-native version 0.69

I am using react-native version 0.69 and I want to read a file stored in assets in my react native project.
using following syntax in App.js
import fs from 'react-native-fs';
I have installed 'react-native-fs' and followed all the links I could find on the internet but I am still getting below error while running the app.
ERROR TypeError: null is not an object (evaluating 'RNFSManager.RNFSFileTypeRegular')
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current
project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
I tried to run react-native link react-nativs-fs but link support has been removed in react-native >= 60 as mentioned in official docs,
I am unable to get this to work, any help would be appreciated. I have seen similar issues on the stackoverflow but none has given the answer for react native >=0.60 versions
Also I am using expo to create the app.
my OS is Windows 10 64 bit.
react-native-fs is not supported with Expo but it is only supported by Pure React Native.
Expo has a package that offers filesystem support:
expo-file-system

I am getting this issue while using moti library with react native

I installed reanimated and moti library both and added reanimated plugin in babe-config-js file still getting this issue

Invariant Violation: TurboMoudleRegistry.getEnforcing:'AppState' could not be found.Verify that module by this name is registered in native binary

This error appears after ejecting expo project to bareflow react native project v0.61.5.
I have tried finding implementation for AppState in project but could't find any.
I am running my project with react-native run-android after react-native start

React Native app crashes on launch with Invariant Violation

I have a react native app built using Expo and everything was working fine until I had to npm install a package that broke everything. I've uninstalled the said package but the app doesn't seem to work any more. It shows the following invariant violation:
It shows an error Invariant Violation: ListView has been removed from React Native - however, I have not used ListView anywhere in my project. All my lists are through FlatList or VirtualisedList.
Additionally, I'm unable to deduce from the error info about the origin of this error. How do I fix this?
If you have the backup of the code please check the older version of React Native in package.json.
When you do npm install command your React Native version upgraded or may be some other packages.
So, you need to compare the packages with old package.json file. If you found that some packages are updated then you need to remove ^ e.g react-native: ^0.60.0 from package dependencies. This one is the only way to solve this problem.

invariant violation: requirenativecomponent: "rncamera" was not found in the uimanager

In react native I want to add a barcode scanner and take a picture on my app but I am running in to the following error:
invariant violation: requirenativecomponent: "rncamera" was not found
in the uimanager.
When barcode component view opens.
react-native-camera 3.3.0
react-native sdk-32 (expo)
Had the same problem with react-native-camera, rebuild(react-native run-android) fixed the problem. I have noticed that similar issues with other libs as well. I think linking sometimes doesn't properly take affect with just reloading
you will most likely have to eject to native code out of expo because any third party package that asks you to run the command "react-native link" as part of the setup process is strictly to be used with pure react native app. hope that helps