Troubleshooting techniques
You might be wondering how we are going to find out what happens when the build fails or what happens if the build doesn't work anymore due to library upgrades. So, in this section, we will learn how to look at the online console logs to find out about what went wrong. Let's get started:
- Let's create a failed build scenario by adding a bug to one of our React apps. To do this, comment out one of the
import
statements in theApp.tsx
file and recommit the code to the repository after:import * as subscriptions from "./graphql/subscriptions"; // import { AmplifyS3Image } from "@aws-amplify/ui-react"; import awsExports from "./aws-exports";
- Now, go to Amplify Console to check out the new build. The build should have failed due to the error that we created within the app.
- Click on the Build tab of the DevOps pipeline and expand the collapsible area where the frontend error occurred to check out the console...