Amplify-console: nextjs gatsby app amplify build error : aws-exports.js .gitignore

Created on 27 Aug 2020  路  6Comments  路  Source: aws-amplify/amplify-console

Describe the bug
I am currently developing an ecommerce application with nextjs and gatsby. When deployed to amplify, the build fails with "Module not found: Can't resolve'../aws-exports' in ~" during the build process, because .gitignore is processed.

To Reproduce
Commenting out the aws-exports.js file in the .gitignore file really builds.

Please refer to it when working.

pending-customer-response question

All 6 comments

@ywroh are you using Amplify console to deploy this?

Can you share more details?

@ywroh I will transfer this issue to Amplify console repo, they can answer that better than me

@ywroh Can you provide your App ID and region? We will look into this for you.

Thank you for your interest in the issues I have registered.

I am wondering if there will be any security issues with the app ID and region information.

First of all, the region is ap-northeast-2.

@ywroh you have two choices:

  1. Commit the awsexports.js file to your repo.
  2. Add the backend phase to the buildspec: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html#frontend-with-backend

Thank you for answer. Let's work well with reference.

Was this page helpful?
0 / 5 - 0 ratings