React Native Error: Unable to resolve module `./index`
Solution 1
Used npm start -- --reset-cache
to run Metro Bundler and it worked. Found this solution looking for the answer to the same issue, SO post that helped me.
Solution 2
I think this question might be related to Unable to resolve module `./index` So the question is, did you try to run the app before you connected facebook? If it worked before then we might have a different issue. However, it's similar to this bug: https://github.com/facebook/react-native/issues/24112
A fix has been released a few hours ago. Please upgrade to react-native 0.59.2
.
react-native upgrade
The full guide on how to upgrade: https://facebook.github.io/react-native/docs/upgrading
Solution 3
Thats an error of your backendserver ... look inside the config and remove the module which can't be found
Related videos on Youtube
Chaibi Alaa
Chaibi Alaa has been an IT manager for over 15 years. A graduate of ISET in IT systems development, he launched his IT development agency BluePen Labs before graduation and began his freelance career at the age of 13 with RentaCoder.com. Today he is a certified expert in Laravel and chairs his agency which today brings together more than 20 developers spread over 4 countries and serves more than 5000 client all over the world.
Updated on June 04, 2022Comments
-
Chaibi Alaa almost 2 years
I have a newly created application using React Native. The app contains a simple login form and a fetch query, nothing complicated, few css and components.
I tried to implement Facebook, and after a LOOOT of struggle, I stopped receiving Facebook errors, while now, I get this error which makes no sense when I run react-native run-android :
No screen shown, nothing, diretcly this 500 error. I searched all over and over for a solution, I even added the form for Gradle, re-installed all npm packages after rm rf node_modules.. still the same error.
implementation ("com.facebook.react:react-native:0.58.5"){force = true}
-
Chaibi Alaa about 5 yearsGiven the correct path where ? the thing is that I don't understand the error, I don't know where a module called ./index is being set !
-
ElusiveCoder about 5 yearsCan you describe this deeply to make it clear to the OP?
-
Chaibi Alaa about 5 yearsThe problem was that initlally the project was built under expo, so index was deleted.
-
Sara Inés Calderón about 5 yearsupgrading to
0.59.2
fixed it for me -
Chaibi Alaa about 5 yearsIn fact it appears to be nothing related to facebook
-
truthadjustr over 2 yearseL magnifeco!!!