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

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

Related

Why is React imported in a React-Native project and which versions are compatible?

I'm following the react-hook-form docs to implement the demo in my react-native project. https://react-hook-form.com/get-started/#:~:text=import-,React,-from%20%22react%22%3B%0Aimport%20%7B%20Text
I realized I must install React, so I did, but when I ran the form component, I got a Render Error "Can't find variable: React". I checked the react-native CLI and saw there was a warning about 'react-native missing peer dependency React#17.0.1'
I downgraded from react 17.0.2 but I still get this error.
So my question is, why must we import React to use libraries like react-hook-form in react-native?
And how do you tell which react version is compatible with react-native?

Using highcarts in react native and getting the error

I have installed npm install #highcharts/highcharts-react-native in my react native project and i also added the hcscript in metro.config.js file.
Iam getting the error of
Failed to fetch scripts or layout. The method or property expo-file-system.readDirectoryAsync is not available on android, are you sure you've linked all the native dependencies properly?
if you wanted to use this package: #highcharts/highcharts-react-native you should first install react-native-unimodules which is a set of native dependencies used at the core of #highcharts/highcharts-react-native as
they built the package on top of expo not bare react native.
it is going to require you to make heavy edits in the native ios and android files such as appDelegate.m in ios and more alike files.
However, you should notice this package is deprecated as per the official page, and there is no reliable alternative!

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.

Requiring unknown module "object-assign"

Hi i am a newbie to react native, just now installed react and trying to open my first app but it shows error. Please guide me what to do next and why it happens.
Some packages you installed maybe not compatible with the React Native version you used. You can check the peerDependencies of all your dependencies and try to remove dependencies which have a react-native version less than 0.25 in peerDependencies.