Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eas build error - unable to resolve aws-exports.js #906

Closed
mar7yn opened this issue Jan 12, 2022 · 1 comment
Closed

eas build error - unable to resolve aws-exports.js #906

mar7yn opened this issue Jan 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@mar7yn
Copy link

mar7yn commented Jan 12, 2022

Build/Submit details page URL

https://expo.dev/accounts/orix81/projects/roundabout-mobile-v2/builds/9f873d53-992e-48c9-8e83-a155cfbf5a64

Summary

Running

eas build -p ios

In a project that uses AWS Amplify results in a Fastlane error:

Metro encountered an error: Unable to resolve module ./src/aws-exports from /Users/expo/workingdir/build/App.js:

aws-exports.js is an auto-generated AWS config file that exists in .gitignore

Managed or bare?

Managed

Environment

EAS CLI 0.44.1 environment info:
System:
OS: macOS 12.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
npm: 8.3.0 - ~/.nvm/versions/node/v16.13.2/bin/npm
Utilities:
Git: 2.32.0 - /usr/bin/git
npmPackages:
expo: ^42.0.0 => 42.0.5
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
npmGlobalPackages:
eas-cli: 0.44.1
expo-cli: 5.0.3
Project workflow: managed

Error output

`
❌ Metro encountered an error:
Unable to resolve module ./src/aws-exports from /Users/expo/workingdir/build/App.js:

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)
    24 | */
    25 | import Amplify, { Auth, API, graphqlOperation } from 'aws-amplify'

26 | import config from './src/aws-exports'
| ^
27 | import AuthNavigator from './src/navigators/AuthNavigator'
28 | import { getUser } from './src/graphql/queries'
29 |
715
› Generating debug RoundaboutUK » RoundaboutUK.app.dSYM
716
▸ ** ARCHIVE FAILED **
717
▸ The following build commands failed:
718
▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/RoundaboutUK-bursllnonbttbkctvpgkohghzszo/Build/Intermediates.noindex/ArchiveIntermediates/RoundaboutUK/IntermediateBuildFilesPath/RoundaboutUK.build/Release-iphoneos/RoundaboutUK.build/Script-00DD1BFF1BD5951E006B06BC.sh
719
▸ (1 failure)
720
** ARCHIVE FAILED **
721
722
723
The following build commands failed:
724
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/RoundaboutUK-bursllnonbttbkctvpgkohghzszo/Build/Intermediates.noindex/ArchiveIntermediates/RoundaboutUK/IntermediateBuildFilesPath/RoundaboutUK.build/Release-iphoneos/RoundaboutUK.build/Script-00DD1BFF1BD5951E006B06BC.sh
725
(1 failure)
726
Exit status: 65
727
728
+-------------+-------------------------+
729
| Build environment |
730
+-------------+-------------------------+
731
| xcode_path | /Applications/Xcode.app |
732
| gym_version | 2.185.1 |
733
| sdk | iPhoneOS14.5.sdk |
734
+-------------+-------------------------+
735
Looks like fastlane ran into a build/archive error with your project
736
It's hard to tell what's causing the error, so we wrote some guides on how
737
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
738
Before submitting an issue on GitHub, please follow the guide above and make
739
sure your project is set up correctly.
740
fastlane uses xcodebuild commands to generate your binary, you can see the
741
the full commands printed out in yellow in the above log.
742
Make sure to inspect the output above, as usually you'll find more error information there
743
744
[stderr] [!] Error building the application - see the log above
745
Error: Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message`

Reproducible demo or steps to reproduce from a blank project

Any new expo project that utilises AWS Amplify, and thus contains an aws-exports.js config file

@mar7yn mar7yn added the bug Something isn't working label Jan 12, 2022
@dsokal
Copy link
Contributor

dsokal commented Jan 13, 2022

This is a duplicated issue, please see:

@dsokal dsokal closed this as completed Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants