Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Resolve Module in React Native App

Tags:

react-native

I'm getting an error in React Native saying it can't resolve a module. It's saying a certain folder doesn't exist but the path isn't accurate. It is telling me that Directory /Users/user/Desktop/RNApp/app/app/containers doesn't exists. I have no idea where that second app is coming from in the path though. My directory looks like this

enter image description here

This is how I am exporting my container components in app/containers/index.js

export RNAppNavigator from './Navigator/RNAppNavigator' export SplashContainer from './Splash/SplashContainer' export AppContainer from './App/AppContainer' 

So I should be able to import them like import {AppContainer} from '~/containers correct? I don't get an issue with any other components. Just the AppContainer.

Thanks!

like image 949
maxwellgover Avatar asked Dec 05 '16 23:12

maxwellgover


People also ask

How do I use the Select option in react native?

To work with react-native-picker-select , we must import the RNPickerSelect component: import RNPickerSelect from "react-native-picker-select"; This component is then reused in our code to render the select view.


1 Answers

react-native start --reset-cache solved the issue. https://github.com/facebook/react-native/issues/1924

like image 65
maxwellgover Avatar answered Sep 21 '22 14:09

maxwellgover