0

import React, { useRef, useState } from 'react' import {Modal, Image, ScrollView, StatusBar, View, FlatList , Animated, Text, StyleSheet, TouchableOpacity, Dimensions} from 'react-native' import { AntDesign, MaterialIcons, Ionicons, Entypo, FontAwesome} from '@expo/vector-icons' import CutString from '../methods/CutString' //import VideoPlayer from 'expo-video-player' import { ResizeMode } from 'expo-av' import VideoPlayer from 'react-native-video-player' //import VideoPlayer from 'expo-video-player'

const {width, height} = Dimensions.get('window')

const FormationBox = (props)=>{ const data = props.data return( {data.title} {data.desc} ) }

export default FormationBox

======================================================================================================================================================================================================================================================bugs:

TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style') at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError at node_modules/metro-runtime/src/polyfills/require.js:203:6 in guardedLoadModule at http://192.168.10.199:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:175221:3 in global code

Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
ChezB
  • 1
  • 1
  • 1
    Havent really got a clue about react so Im not giving an answer but should there not be a semi-colon between the assertion of const data and the return statement. I have a rough idea react should be javascript-like and if an error happens in the promise, the value of FormationBox is undefined, which the exception handler doesnt truly handle but just reports. No clue about react but is it a semi-colon error? – Stephen Duffy Aug 05 '22 at 07:54
  • Do you know what you npm installed before this? I'm having an identical issue, something must be deprecated somewhere –  Aug 10 '22 at 17:29

0 Answers0