-
Notifications
You must be signed in to change notification settings - Fork 820
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
Unable to build backend when using Amazon Linux:2023 and default Amplify CLI #13423
Comments
Hello! Thanks for reaching out to us. We bumped up the default Amplify CLI version in the new build image. The new version is probably not compatible with your deployment. The default version of the Amplify CLI in the AL2 image was 10.5.2. Do you have live package updates for the Amplify CLI? If you don't, then your app was building against 10.5.2 all this while, which is probably the safest version for your build. However, to confirm whether this issue is related to something else going on in the build image or not, I'd recommend that you use the AL2 image and set the Amplify CLI version to latest via live package update. If the build fails with the same reason, then the Amplify CLI version is the root cause. |
I was previously using a custom image: aws-amplify/amplify-hosting#3779 (comment). Base AL2 did not work: aws-amplify/amplify-hosting#3109 (comment)
Not sure I understand how a minor bump (from 12.5.2 to 12.6.0 and above) can cause an issue. The build fails without any extra information, so it’s not clear what to look for. See |
@kachkaev I apologize for the inconvenience caused by this issue. Is there a specific version of the Amplify CLI that you'd like to use with your builds? If there's a specific version you want, then please set it via live package overrides so that you can be intentional about bumping up the version as and when you need. Otherwise, your builds will always default to the default version in the build image - Whenever we release a new version of the build image, the default CLI version will potentially get updated With regards to why this build is failing, you'd have to create an issue with the Amplify CLI. Here's their repo: https://github.com/aws-amplify/amplify-cli/issues |
When I set I am trying to understand why a minor version bump of Amplify CLI makes any difference. This does not look right, especially because unsuccessful build logs don't contain any useful information (see logs in the initial comment). I am opening this issue because I think that other developers may find themselves in the same trap. |
A bit more info: our project uses pnpm instead of npm/yarn. We call As you can see in my original post, our failing build logs are not very helpful. All we see is |
Hey @kachkaev, could you try adding |
Just tried Details
Note that the project uses |
Hey @kachkaev, thank you for the information. The issue appears to be similar to #2948. |
I’m afraid I won’t be able to try this hack with removing |
@kachkaev I understand, i am not aware on other workarounds at this moment. But the |
Closing due to inactivity |
|
Before opening, please confirm:
App Id
d3bq67l0547585
AWS Region
eu-west-2
Amplify Hosting feature
Build settings
Frontend framework
Next.js
Next.js version
13.5.6
Next.js router
Pages Router
Describe the bug
I am trying to upgrade to Next.js 14. The original issue (aws-amplify/amplify-hosting#3773) got resolved by a new image Amazon Linux 2023. I tried this image and saw
v18.18.2
when runningnode --version
. That’s good.However, the build failed:
Last few lines of the logs:
Expected behavior
Backend builds without errors.
Reproduction steps
Amazon Linux:2023
Build Settings
No response
Log output
No response
Additional information
I managed to find a workaround:

Setting Amplify CLI version to anything higher than 12.5.2 causes the failure.
Backend build logs when Amplify CLI version is set to 12.5.2:
Frontend build is successful too.
The text was updated successfully, but these errors were encountered: