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

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

Related

Can't install react native base

So I went to the react native base website and I found the link for installing via terminal on already existing project and I get error messages saying module not found. Any solutions ?
I tried installing it but module not found

Unable to resolve module #react-native-masked-view/masked-view 2021

I have already tried all of the answers in this previous thread and they have not worked
Unable to resolve "#react-native-community/masked-view
I have been unable to build my app in any capacity. Using expo ~42.0.0 to manage installations.
Unable to resolve module #react-native-masked-view/masked-view from
/node_modules/#react-navigation/elements/src/MaskedViewNative.tsx
Here is that file on their main branch
https://github.com/react-navigation/react-navigation/blob/main/packages/elements/src/MaskedViewNative.tsx
Just curious what this error means, expo documentation says react navigation uses #react-native-community/masked-view this error and code in the latest release says other wise
https://docs.expo.dev/versions/latest/sdk/masked-view/
Has anyone found a solution?
expo documentation says react navigation uses #react-native-community/masked-view
Expo documentation says React Navigation 5.x uses #react-native-community/masked-view. You're probably using React Navigation 6.x, not React Navigation 5.x. But it doesn't matter what Expo documentation says if you're getting an error because a specific package is missing and you already know which package it is.
You need to install #react-native-masked-view/masked-view:
expo install #react-native-masked-view/masked-view

Sendbird SDK requires fs package in react native

When I install the sendbird SDK into a expo managed react native project I get the following error:
The package at "node_modules/sendbird/SendBird.min.js" attempted to import the Node standard library module "fs". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq/#can-i-use-nodejs-packages-with-expo
However fs is a node package which isn't the environment run by react native. I've looked through the Sendbird examples, and have used this very same SDK in other apps. What am I doing wrong with this one?
SendBird here! Our apologies, but there is a known issue in JavaScript version 3.0.119 that is causing it. This will be fixed in the next version, coming very soon! In the meantime, please build with version 3.0.118 as needed.
If you are using npm, you can run this command:
npm install --save sendbird#3.0.118

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.

Cannot find module 'babel-plugin-graphql-tag' when running App with React Native 0.59.1

I ran into that strange issue after upgrading to React Native 0.59.1 and trying to run my app on iOS devices in xcode.
Loading dependency graph, done.
error: bundling failed: Error: Cannot find module 'babel-plugin-graphql-tag' from '/Users/me/react_projects/my-app'
- If you want to resolve "graphql-tag", use "module:graphql-tag"
I tried to install some potentially missing packages but it does not help. I can post my package.json if that helps.
Many thanks in advance for any help!