I am trying to deploy a nextjs app on aws amplify but build is failing with this error and i am not able to resolve it after 2 days. Can someone please help?
# Starting phase: preBuild # Executing command: npm ci 2024-03-04T14:33:07.994Z [WARNING]: npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead 2024-03-04T14:33:08.196Z [WARNING]: npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead 2024-03-04T14:33:23.969Z [INFO]: added 782 packages, and audited 783 packages in 24s 2024-03-04T14:33:23.975Z [INFO]: 174 packages are looking for funding run
npm fund for details found 0 vulnerabilities 2024-03-04T14:33:23.994Z [INFO]: # Completed phase: preBuild # Starting phase: build 2024-03-04T14:33:23.994Z [INFO]: # Executing command: npm run export 2024-03-04T14:33:24.272Z [INFO]: > frontend@0.1.0 export > npm run build && next export 2024-03-04T14:33:24.548Z [INFO]: > frontend@0.1.0 build > next build 2024-03-04T14:33:25.165Z [INFO]: ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache 2024-03-04T14:33:25.180Z [INFO]: Attention: Next.js now collects completely anonymous telemetry regarding usage. 2024-03-04T14:33:25.181Z [INFO]: This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry 2024-03-04T14:33:25.274Z [INFO]: ▲ Next.js 14.1.0 2024-03-04T14:33:25.274Z [INFO]: 2024-03-04T14:33:25.354Z [INFO]: Creating an optimized production build ... 2024-03-04T14:33:42.529Z [INFO]: ✓ Compiled successfully 2024-03-04T14:33:42.537Z [INFO]: Linting and checking validity of types ... 2024-03-04T14:33:44.325Z [WARNING]: ⨯ ESLint: Failed to load config "prettier" to extend from. Referenced from: /codebuild/output/src4125011457/src/frontend/.eslintrc.yml 2024-03-04T14:33:47.774Z [WARNING]: Failed to compile. 2024-03-04T14:33:47.781Z [WARNING]: ./components/Button/primaryButton.tsx:5:30 Type error: Cannot find module '@/components/constants/types' or its corresponding type declarations. [0m [90m 3 |[39m [36mimport[39m [33mReact[39m [36mfrom[39m [32m"react"[39m[33m;[39m[0m [0m [90m 4 |[39m [36mimport[39m { buttonStyle } [36mfrom[39m [32m"./style"[39m[33m;[39m[0m [0m[31m[1m>[22m[39m[90m 5 |[39m [36mimport[39m { [33mCustomStyleI[39m } [36mfrom[39m [32m"@/components/constants/types"[39m[33m;[39m[0m [0m [90m |[39m [31m[1m^[22m[39m[0m [0m [90m 6 |[39m [36mimport[39m colors [36mfrom[39m [32m"@/assets/colors/index"[39m[33m;[39m[0m [0m [90m 7 |[39m[0m [0m [90m 8 |[39m type [33mProps[39m [33m=[39m {[0m 2024-03-04T14:33:47.857Z [ERROR]: !!! Build failed 2024-03-04T14:33:47.857Z [INFO]: Please read more about Amplify Hosting's support for SSR frameworks to find if your build failure is related to an unsupported feature: https://docs.aws.amazon.com/amplify/latest/userguide/amplify-ssr-framework-support.html. You may also find this troubleshooting guide useful: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html 2024-03-04T14:33:47.857Z [ERROR]: !!! Error: Command failed with exit code 1 2024-03-04T14:33:47.857Z [INFO]: # Starting environment caching... 2024-03-04T14:33:47.857Z [INFO]: # Environment caching completed Terminating logging...