iamshaunjp / react-native-tutorial

All the course files for the React Tutorial for Beginners playlist on The Ne Ninja Playlist
593 stars 508 forks source link

this error appear when i run the code #14

Open jasonleewimi opened 3 years ago

jasonleewimi commented 3 years ago

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of App.

This error is located at: in App (created by ExpoRoot) in ExpoRoot (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in DevAppContainer (at AppContainer.js:121) in RCTView (at View.js:34) in View (at AppContainer.js:132) in AppContainer (at renderApplication.js:39)

akshayverma commented 3 years ago

This is related to incompatibility between versions of expo.

Try upgrading expo to latest version by

expo upgrade

and then change the import for AppLoading in App.js to

npm install expo-app-loading import AppLoading from 'expo-app-loading';