I initialized a new react native project with Amplify.
npm install -g @aws-amplify/cli
amplify configure
npm install -g expo-cli
expo init RNAmplify
cd RNAmplify
amplify init
npm install aws-amplify aws-amplify-react-native @react-native-community/netinfo @react-native-async-storage/async-storage
import Amplify from 'aws-amplify'
import config from './aws-exports'
Amplify.configure(config)
And I keep getting this response when I reload the app. The aws-amplify, aws-amplify-react-native are present in the node_modules directory.
Unable to resolve module ./aws-exports from C:\Users\Masi\IdeaProjects\RNAmplify\App.js:
None of these files exist:
* aws-exports(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
* aws-exports\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
What helped me was that I actually needed to run
amplify init
which creates an amplify folder for you after you answer a few questions.