I have an Expo project with AWS Amplify. I'm currently using EAS from Expo to deploy on mobile.
Pretty often I run on this error:
ā Metro encountered an error:
Unable to resolve module ./src/aws-exports from /Users/expo/workingdir/build/App.tsx:
None of these files exist:
* src/aws-exports(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
* src/aws-exports/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
11 | import Amplify from 'aws-amplify';
> 12 | import awsconfig from './src/aws-exports';
15 | Amplify.configure(awsconfig);
But, I do have the file aws-exports and I can run locally fine. Sometimes I can build without problems. Didn't figure yet a pattern about when it happens or not.
I suspect it may be something related to gitignore(I think that EAS may check it before uploading to server). I already tried to run the command with --clear-cache and I didn't notice any effect.
Any suggestions about what can I do? :)