'My Basic React Native App Keeps Breaking Due to Dependencies

I am coding a React Native app to teach myself the framework. The other day I created a small, relatively simple app. The app consisted of a Navigation Drawers linking 2 Screens. The Home Screen had a FlatList of Custom Cards, the Profile Screen has a 'Hello World!'. There were two model objects that I instantiated in a constants file, and a small assets folder I could reference. On that day, I began to play around with styling the Drawer. Upon learning that you could assign icons to menu items, I began trying to import FontAwesome into the Project. However, somehow I broke my dependencies, and my Git backup wasn't working, so I figured the easiest thing to do was to start over.

I created a new project and dragged and dropped the 9 files over. I thought that it would be as easy as just getting the dependencies re-installed, after all it wasn't a complex project. However, when I installed Navigation and Drawer, my builds broke. Eventually, through extensive use of yarn and pod, I was able to get the app stable enough to run the default React Native page with the 9 files existing in the project. However, if I try to implement anything besides the default Screen, I get a White Screen of Death. Worse, it seems at a drop of a hat the project will cave in and I'll be left unable to build at all. I've got a stable(?) version stashed in Git, but I'm at a loss with how to fix it.

Error:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ProjectCoinApp.xcworkspace.

React Native v0.67.1

React Navigation Drawer v6.1.8

React Navigation Native v6.0.6

Sample Code That's failing right now:

export default function App() {
return (
      <NavigationContainer>
        <Drawer.Navigator initialRouteName="Home">
          <Drawer.Screen name="Home" component={HomeScreen}/>
          <Drawer.Screen name="Profile" component={ProfileScreen} />
        </Drawer.Navigator>
      </NavigationContainer>
  );
}

Things I've tried:

  • Emptying the Cache

  • Cleaning Build Folder

  • pod install

  • Banging my head against the wall

I would appreciate anyone knowledgeable weighting in. Thanks.



Sources

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

Source: Stack Overflow

Solution Source