Troubleshooting AWS Amplify app build failing
Journey: 📊 Community Builder 📊
Subject matter: 💡 Troubleshooting 💡
When I built this blog, I ran into numerous issues that I needed to troubleshoot. All of these issues were due to my lack of understanding of how the architecture worked.
I had one issue that took me a while to figure out which I will document here.
Just like many aspects of IT, just when you finally think you’re getting your head around something, you run into a show stopper.
I mentioned it briefly in this project build post here: Blog Build Project
When I built my blog, I used the best practices within AWS Amplify which was to create a Master branch and a Development branch repo in Github.
That’s great, however, my general knowledge of GitHub isn’t amazing (I get by), and that is where I fell!
In my haste, I uploaded a live copy and built my web app in Amplify… but the configuration wasn’t quite ready so I had to make further changes to the overall Theme to get things right.
In doing this, I ended up with many commits to GitHub, and in one way or another, I managed to create a huge amount of conflicts between the Dev and Master branches.
I investigated and tried a few things before finally attempting a git pull to realign things to my source.
Only to my horror, I overwrote my source which also deleted all of my unpublished material. That was not a good moment.
Undeterred, I re-wrote what I had lost and then attempted to republish the material only for AWS Amplify to suddenly have problems building the site out.
After a lot of troubleshooting, I realised that somehow my earlier git pull had pulled down some go.mod files into my source and Amplify did not like handling these.
I removed the two files and then re-pushed the current content to GitHub again before rebuilding my web app in AWS Amplify and it built out successfully.
This is probably an incredibly rare issue to have as it was a self-created problem rather than any type of bug or defect. However, I still thought it worth a post to document in case it could help other fellow builders and creators!
AWS Amplify is a super quick managed offering, I am enjoying working with it using GitHub as my CI/CD pipeline.