So I am following the AWS Amplify documents to create a react native expo app.( https://docs.amplify.aws/react-native/start/getting-started/setup/ )
I have installed an api for graphQL (which generated typescript) storage and Auth.
Package.json
{"name": "gimme-golf","version": "1.0.0","main": "node_modules/expo/AppEntry.js","scripts": {"start": "expo start","android": "expo start --android","ios": "expo start --ios","web": "expo start --web" },"dependencies": {"@aws-amplify/react-native": "^1.0.28","@aws-amplify/ui-react-native": "^2.1.6","@react-native-async-storage/async-storage": "^1.23.1","@react-native-community/netinfo": "^11.3.1","@types/react": "~18.2.45","aws-amplify": "^6.2.0","babel-plugin-module-resolver": "^5.0.2","expo": "~50.0.17","expo-status-bar": "~1.11.1","react": "18.2.0","react-native": "0.73.6","react-native-get-random-values": "^1.11.0","react-native-safe-area-context": "4.8.2","typescript": "^5.3.0" },"devDependencies": {"@babel/core": "^7.20.0" },"private": true}
App.js
import { StatusBar } from 'expo-status-bar';import { StyleSheet, Text, View } from 'react-native';import { withAuthenticator, useAuthenticator} from '@aws-amplify/ui-react-native';import { Amplify } from 'aws-amplify';import amplifyconfig from './src/amplifyconfiguration.json';Amplify.configure(amplifyconfig);// retrieves only the current value of 'user' from 'useAuthenticator'const userSelector = (context) => [context.user];const SignOutButton = () => { const { user, signOut } = useAuthenticator(userSelector); return (<Pressable onPress={signOut} style={styles.buttonContainer}><Text style={styles.buttonText}> Hello, {user.username}! Click here to sign out!</Text></Pressable> );};const App = () => { return (<SafeAreaView style={styles.container}><View style={styles.container}><SignOutButton /></View></SafeAreaView> );}export default withAuthenticator(App);const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', },});
I have tried deleteing node_modules and package-lock.json and reinstalling with npm i and npx expo install.
Whatever I try I always get a variation of
iOS Bundling failed 4396ms (node_modules/expo/AppEntry.js)Unable to resolve "@babel/runtime/helpers/classCallCheck" from "node_modules/react-native/Libraries/Components/Button.js"
The area it's unable to resolve changes, but it's always failing to bundle. All I have done it follow the documentation so far. And just tried to run after installing auth and the api.