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

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.



Solution 1:[1]

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.

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anselmo Viola
Solution 2 Jukka Koivu