React-native EXPO – APK EAS build app crashes on startup (probably) because of react-navigation

Right now I’m trying to export my app with eas as an apk, but it doesnt work.

When I bundle with expo everything works fine but when I build, the app crashes on startup.
I’ve been removing and debugging most of my code, and the build only crashes when I’m using react-navigation. I’ve looked online and I have all the necessary dependecies for it, I dont see what I’m doing wrong.
Expo doctor shows no issues, files are in the right location (also I’d see that in expoGo if it where the case) and the app builds with all green flags.

Here is my code (dont mind for page1, since when building with just that without react-navigation the app worked just fine):

const themeColor1 = "#7CFC00";
const themeColor3 = "#394230";
const themeColor4 = "#141712";

import React from 'react';
import { View, Text} from 'react-native';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import { NavigationContainer } from '@react-navigation/native';
import { createDrawerNavigator, DrawerItemList } from '@react-navigation/drawer';

import Page1 from './assets/screens/Page1.js';

const Drawer = createDrawerNavigator();

export default function App() {
    return (
    <NavigationContainer>
      <Drawer.Navigator 
        initialRouteName="Page1"
        drawerContent={(props) => (
          <SafeAreaView style={{ flex: 1 }}>
            <View
              style={{
                height: 180,
                width: '100%',
                justifyContent: 'center',
                borderBottomColor: themeColor1,
                inactiveTintColor: themeColor1,
                borderBottomWidth: 0.5,
                marginLeft: 0,
                alignItems: 'center',
                textAlign: 'center',
              }}>
              <Text
                style={{
                  fontSize: 30,
                  marginVertical: 6,
                  justifyContent: 'space-evenly',
                  color: themeColor1,
                  textAlign: 'center', 
                }}>
                App that crashes
                on startup 
              </Text>
            </View>
            <DrawerItemList {...props} />
          </SafeAreaView>
        )}

        screenOptions={{
          drawerStyle: {
            backgroundColor: themeColor4,
            width: 250,
          },
          headerStyle: {
            backgroundColor: themeColor4,
          },
          
          headerTintColor: themeColor1,

          headerTitleStyle: {
          },

          drawerLabelStyle: {
            color: '#111',
          },

          headerTitle :{
            color: '#111',
          },
          drawerActiveBackgroundColor: themeColor3,         
        }}>
        <Drawer.Screen
          name="Page1"
          options={{
            title: 'Page1',
            drawerLabel: () => (<Text>Page1</Text>),
            drawerIcon: () => (<MaterialCommunityIcons name="file-document-edit" size={30} color={themeColor1}/>),
          }}
          component={Page1}
        />
      </Drawer.Navigator>
    </NavigationContainer>
  );
}

app.json:

{
  "expo": {
    "name": "App",
    "slug": "App",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.nicola.app"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": "04e732f6-d275-463b-b775-45ca301b9be1"
      }
    },
    "runtimeVersion": {
      "policy": "appVersion"
    },
    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "usesCleartextTraffic": true
          }
        }
      ]
    ]
  }
}

and eas.json:

{
  "build": {
    "preview": {
      "android": {
        "buildType": "apk"
      }
    },
    "preview2": {
      "android": {
        "gradleCommand": ":app:assembleRelease"
      }
    },
    "preview3": {
      "developmentClient": true
    },
    "preview4": {
      "distribution": "internal"
    },
    "production": {}
  }
}

Do you have any suggestions? I’m running out of ideas to be honest.
Thanks

Tried removing all the code sequentially until I’ve arrived to the point where the app only crashes when using navigation.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật