Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

React native is unable to find modules that definitely exist

$
0
0

So after playing with Expo for a bit I've decided that I'd rather develop with the option for native features if needed.

I've followed all the steps here: https://reactnative.dev/docs/environment-setup and double checked them.

I ran npx react-native init <myprojectname> which was create successfully. I've then copied my minimal existing code to my new project, and now I can't run the app. I was able to run my code when it was on expo, and I was able to run the initial native setup before copying my code.

The issue doesn't seem to be related to the code itself though. Maybe some configuration?

It says it is Unable to resolve module.. and that None of these files exist.

These files most definitely exist.I've tried cleaning the app's cache from my phone. Completely deleting it and reinstalling.I've tried renaming my screen name from HomeScreen.tsx to HomeScreen.native.tsx.

Nothing seems to work. What is the issue here?

This is the error screen

enter image description here

And this is my files structure:

enter image description here


Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>