error: Error: Unable to resolve module react-freeze - react-native

I was adding drawer navigation to my application and everything worked fine. But 4 days after I started receiving following error.
error: Error: Unable to resolve module react-freeze from C:\Users\Jukez\Desktop\familyrecipebook\node_modules\react-native-screens\src\index.native.tsx: react-freeze could not be found within the project or in these directories
I have read the repository of the react-native-screens and tried adding the enableFreeze(false) to App.js but still the error remained. Then tried adding it to the index.js but the error still remained.
I have also run yarn start --reset-cache and gradlew clean
But those haven't worked either and now I am running out of ideas.

Try to Re-install the package and after do "npm install".
If it doesnt work open your "package.json" file and remove the package from there.

It seems that the issue was react-native: 0.68.2 version and when downgraded to 0.68.1 everything worked normally. Seems like there is some issues within new version so have to wait little bit before updating

Related

Inexplicable Error When Starting React Native Project - TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')

I was working in my project with no problem, the last thing I had installed was the react-native-video-player and all was working well. I ran into a normal error, I think it was a typo I had just added, something simple, and it shut down the app, as expected. I fixed the error and tried to start the project again, to be greeted with the following error, seen in the title...
TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')
I then tried the usual slew of things I try when something in a file that I have no access to is bugging. I deleted node_modules and my package.lock.json and reran npm i. I kept getting the same error, proceeded by a few different ones. After trying numerous solutions, uninstalling different npm packages that I thought would be the culprit, and no success.
The way I got the errors and any errors proceeding the initial one kept changing, but now I've hit a wall. The phone simulator white screens, and I get the following three errors in my Metro Bundle Terminal:
TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
I then created a new branch where I deleted node_modules, package.lock.json, yarn.lock, and even my package.json. When I then tried to start the app using npx react-native run-is, I got the expected prompt to install React Native. I did, and it installed. Once it installed, I got the same error! If I run a search for the words involved with the error-- nothing, if I try to search for the page in which the error occurs-- nothing. So this means it HAS to be in the node_modules, as those are the only files where searches don't hit. I truly have no idea how to solve this, as I haven't used material icons anywhere (including my yarn.lock, my package.json, and my package.lock.json)
To summarize the steps I've tried to no avail (in no order, I don't remember anymore)...
deleted node_modules, package.lock.json and yarn.lock and ran npm i and yarn
deleted ios/pods and ios/build and ios/Podfile.lock and ran pod install
ran pod update
Some combination of 1, and 2
run npm uninstall material-icons
Deleted all node related, and yarn related files and directories and started fresh with a brand new react-native install
run yarn cache clean
run killall -9 node
run npm audit -fix
Restarted my machine
I should have tried this earlier, but it ended up being something messed up in the react-native-video-player. They had to have added something to it very recently, as I was successfully using it awhile ago. Gotta love when they up upload deprecated packages

Error trying to resolve #expo/vector-icons/FontAwesome in a vanilla React Native project

I ran into this strange error today: Unable to resolve module `#expo/vector-icons/FontAwesome` from `node_modules/react-native-elements/src/checkbox/CheckBoxIcon.js`: #expo/vector-icons/FontAwesome could not be found within the project.
This project does not use expo, it was built using vanilla React Native CLI. I checked the CheckBoxIcon.js file in node_modules and I don't see any references to #expo.
Not sure if it matters but I was working on ane xpo project prior to this but it shouldn't be affecting this separate project I'm working on, will it?
I'm not sure how to fix this, I have tried clearing watchman watches, deleting node_modules and reset metro's cache.
npm start --reset-cache did not work but npm start -- --reset-cache fixed my issue.

Why is metro builder unable to resolve a 'main' module specified within react-native-gesture-handler?

So I installed the react-navigation 5.x following the documentation, and after pasting the import 'react-native-gesture-handler'; in my index.js and internal error popped up stating it couldn't resolve some 'main' module which is specified in the package.json of react-native-gesture-handler.
This is the error i'm getting. I looked at some other similar solutions wherein they stated to link react-native but those steps were for a previous version i guess.
This says that there's index in the react-native-gesture-handler but there is!!
Please help as i'm a newbie to react-native and such errors just demotivates
Try removing the apostrophe from your project name.
Occasionally after installing, the Metro Bundler's file watcher appears to become desynchronized with the state of the node modules directly, or the cache can become corrupted.
Try deleting your node_modules/ directory, reinstalling using yarn or npm i and then use:
react-native start -- --reset-cache

react-native .babelrc changes not working

I had an issue compiling my react native app, because of an incorrect setting in .babelrc. I removed the offending setting and ran it again in the ios simulator react-native run-ios but I still see the same error:
Unknown option:/.../.babelrc.requireDirective
even though I have completely removed the requiredDirective option from .babelrc.
I tried running npm cache clear, but still get the same issue.
It looks like my problem is that it is still hanging on to the old .babelrc settings. If so, how can I go about clearing it properly?
Did you try to run the packager with --reset-cache option?
react-native start --reset-cache

react-native while the package is building it gives an error like Unable to resolve module `ReactNativeART

Here i am working on react-native. There is no problem while i run "react-native run-android". it builds 100%. But while the packager is building, it gives me an error like "Unable to resolve module ReactNativeART from /node_modules/react-native/Libraries/react-native/react-native-implementation.js. i tried watchman clean , npm clean, deleted node_modules and freshly created, but again it shows me the same error. my react-native version is 0.46.4 and react version is 16.0.0-alpha.12. Event i down graded the react and react-native version. But it shows some other errors in ios/pods/react/libraries/ folders. Give me some suggestions please.