-
Notifications
You must be signed in to change notification settings - Fork 113
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
Building with Node 18 #3796
Comments
Hmm I think the issue is that default build image is Linux2 (which is deprecated), newest is Linux 2023, which has the correct libc version.... |
Any workaround for this? Node 16 has reached EOL and is not receiving any security updates since 2 months, it's important to be able to upgrade to nodejs 18 or 20. |
I found a solution that works for my case (using a frontend only): Go to Build settings -> Build image settings -> Edit. Select "Build image" instead of "Amaon Linux:2 (default)", enter "public.ecr.aws/docker/library/node:20.9.0", and clear the Live package updates (In my case there was one for "Nodejs version 16"): |
That would work :-) I still think Amplify should change default image to Linux 2023 (which I think has support for both node 18 and 20). It seems that node 18 is the default node version inside amplify when creating lambda functions, so it is very strange that the build engine only has support for version 16 without specify a custom engine. |
Still waiting for them to fix correct environment name when deploying. Seems that there are few bug fixs and updates on this UI page? |
Definitely. Nodejs 16 is not a good default anymore, it's outdated and not maintained anymore 😅 |
Looks like Linux 2023 with Node 18 is available now (just not as a default): #3773 (comment) |
The new image 2023 worked for me :-)
I did need to increase memory usage for Node to build my application.
```
preBuild:
commands:
- export NODE_OPTIONS=--max-old-space-size=7168
```
|
Ah, yes, the |
Thanks for the comments! I'm closing this issue since the new AL 2023 image uses Node 18 by default. |
|
This issue has been automatically locked. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
node 18.x
Amplify CLI Version
12.7.1
What operating system are you using?
windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
I've build setting with latest amplify CLI and node 18, but this will not build when patching/setting amplify version...
Changing back to Node 16, and then i works. Since newest LTS is version 20, node 18 should at least be supported?
Expected behavior
Should build when build setting is node 18 and amplify cli set to latest
Reproduction steps
Change build setting to node 18 and amplify to latest, then to new build or redeploy.
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: