Skip to content
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

Add support for Node 18 #580

Closed
antonyfrancis opened this issue Nov 15, 2022 · 28 comments
Closed

Add support for Node 18 #580

antonyfrancis opened this issue Nov 15, 2022 · 28 comments

Comments

@antonyfrancis
Copy link

antonyfrancis commented Nov 15, 2022

Hello there 👋 ,

Now that Node 18 is LTS (https://nodejs.org/en/), can we add support for Node 18 as a supported runtime on CodeBuild?

Thanks heaps.

@HaaLeo
Copy link

HaaLeo commented Nov 15, 2022

As described in #490 the following workaround also applies for nodejs 18:

phases:
  install:
    runtime-versions:
      nodejs: 16
    commands:
      - n 18

@nick-kang
Copy link

nick-kang commented Nov 20, 2022

As described in #490 the following workaround also applies for nodejs 18:

phases:
  install:
    runtime-versions:
      nodejs: 16
    commands:
      - n 18

I don't think this works with aws/codebuild/amazonlinux2-aarch64-standard:2.0 (we're using ARM images). When I run n 18, I get version GLIBC_2.28' not found (required by node). It works when I run n 16.

@wilhen01
Copy link

+1 for this.

Also as a point going forward, could AWS try and coordinate CodeBuild support for Node versions with Lambda support? Generally we're only happy to upgrade once we can get CI build environments to match the lambda runtime.

@christopher-learningpool

+1 for this.

@lucas-subli
Copy link

lucas-subli commented Dec 12, 2022

+1

1 similar comment
@ariadne-github
Copy link

+1

@joshlang
Copy link

joshlang commented Jan 3, 2023

+2 :)

@cb-dcc
Copy link

cb-dcc commented Jan 19, 2023

September 11th, 2023 is the EOL for Node JS 16. https://nodejs.org/ar/blog/announcements/nodejs16-eol/

A Node JS 18 compatible aws codebuild image needs to be available prior to this EOL. Whether that is updating existing images, or releasing new images. As mentioned above, the issue we encounter is version GLIBC_2.28' not found (required by node). This error appears across multiple existing aws codebuild images.

@joebowbeer
Copy link
Contributor

joebowbeer commented Jan 19, 2023

@dc0g wrote:

As mentioned above, the issue we encounter is version GLIBC_2.28' not found (required by node). This error appears across multiple existing aws codebuild images.

I believe the following runtimes can install (and use) node18 using the - n 18 commands workaround:

  • aws/codebuild/standard:5.0 - nodejs: 14
  • aws/codebuild/standard:6.0 - nodejs: 16

Which runtimes cannot install (and use) node18?

  • aws/codebuild/amazonlinux2-aarch64-standard:2.0
  • others?

@isker
Copy link

isker commented Jan 19, 2023

Which runtimes cannot install node18?

Any image can install Node 18, but aws/codebuild/amazonlinux2-aarch64-standard:2.0 can't run it because its libc is too old (being from RHEL7). Node 18 introduced a requirement on a higher libc version than is available in RHEL7-based distros. You get an error like this when running node 18:

version GLIBC_2.28' not found (required by node)

But yes, switching to the ubuntu-based images works just fine.

@cb-dcc
Copy link

cb-dcc commented Jan 19, 2023

We run into the same libc issue with the aws/codebuild/amazonlinux2-x86_64-standard:4.0 image.

@juicycool92
Copy link

As described in #490 the following workaround also applies for nodejs 18:

phases:
  install:
    runtime-versions:
      nodejs: 16
    commands:
      - n 18

According to @HaaLeo's comments, I test on Linux aws/codebuild/standard:6.0 image.

[Container] 2023/01/30 02:37:01 Processing environment variables
[Container] 2023/01/30 02:37:01 Selecting 'nodejs' runtime version '16' based on manual selections...
[Container] 2023/01/30 02:37:01 Running command echo "Installing Node.js version 16 ..."
Installing Node.js version 16 ...

[Container] 2023/01/30 02:37:01 Running command n $NODE_16_VERSION
     copying : node/16.15.1
   installed : v16.15.1 (with npm 8.11.0)

[Container] 2023/01/30 02:37:37 Moving to directory /codebuild/output/src291980793/src
[Container] 2023/01/30 02:37:37 Configuring ssm agent with target id: codebuild:e7d31ce1-3e14-427f-a4ae-8ad682b2943c
[Container] 2023/01/30 02:37:37 Successfully updated ssm agent configuration
[Container] 2023/01/30 02:37:37 Registering with agent
[Container] 2023/01/30 02:37:37 Phases found in YAML: 3
[Container] 2023/01/30 02:37:37  INSTALL: 2 commands
[Container] 2023/01/30 02:37:37  PRE_BUILD: 2 commands
[Container] 2023/01/30 02:37:37  BUILD: 7 commands
[Container] 2023/01/30 02:37:37 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
[Container] 2023/01/30 02:37:37 Phase context status code:  Message: 
[Container] 2023/01/30 02:37:37 Entering phase INSTALL
[Container] 2023/01/30 02:37:37 Running command n 18
  installing : node-v18.13.0
       mkdir : /usr/local/n/versions/node/18.13.0
       fetch : https://nodejs.org/dist/v18.13.0/node-v18.13.0-linux-x64.tar.xz
     copying : node/18.13.0
   installed : v18.13.0 (with npm 8.19.3)

its works but i also do hope support nodejs 18 without workaround soon.

Thanks for tip guys. these comments are saved a lots of time!

@joshlang
Copy link

joshlang commented Mar 3, 2023

Using aws/codebuild/amazonlinux2-x86_64-standard:4.0 (the latest available version), it's broken for us too.

[Container] 2023/03/03 16:08:25 Running command n 18
--
32 | installing : node-v18.14.2
33 | mkdir : /usr/local/n/versions/node/18.14.2
34 | fetch : https://nodejs.org/dist/v18.14.2/node-v18.14.2-linux-x64.tar.xz
35 | copying : node/18.14.2
36 | node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
37 | node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
38 | /usr/local/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /usr/local/bin/node)
39 | /usr/local/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /usr/local/bin/node)

@nikhil-zadoo
Copy link

I am also facing the same issue

@nikhil-zadoo
Copy link

As described in #490 the following workaround also applies for nodejs 18:

phases:
  install:
    runtime-versions:
      nodejs: 16
    commands:
      - n 18

I don't think this works with aws/codebuild/amazonlinux2-aarch64-standard:2.0 (we're using ARM images). When I run n 18, I get version GLIBC_2.28' not found (required by node). It works when I run n 16.

https://aws.amazon.com/about-aws/whats-new/2023/03/amazon-linux-2023/ With the new amazon linux version, GLIBC is also getting updated. Hopefully it works soonish.

@wilhen01
Copy link

Bumping this again given the impending EOL for Node 16. We've recently moved all of our Lambda services to Node 18, and moved our Codebuild jobs to Node 18 using the workaround described further up the thread here.

This works fine most of the time but occasionally builds fail to download the Node 18 runtime which lead to failures along the lines of Error: failed to download archive for 18.15.0 / Error while executing command: n 18.. It's tedious to have to re-run pipelines to fix intermittent network issues - can we please have proper Node 18 support in the standard images?

@afrankevych
Copy link

+1 ing this

@EricF-at-AWS
Copy link

Cross-posting from #607:

Node 18 should be supported on Ubuntu based image in a couple of weeks from now. Amazon Linux image will be updated to AL2023 base and support Node 18 by mid-May.

@Dylan-AWS
Copy link
Contributor

Added node 18 support to ubuntu 7.0 #621

@Dylan-AWS
Copy link
Contributor

Added node 18 support for ARM #627

@nguyengg
Copy link

Just tested aws/codebuild/amazonlinux2-aarch64-standard:3.0, looks like it works!

[Container] 2023/04/25 21:39:43 Running command n lts && node -v && npm -v
--
installing : node-v18.16.0
mkdir : /usr/local/n/versions/node/18.16.0
fetch : https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-arm64.tar.xz
copying : node/18.16.0
installed : v18.16.0 (with npm 9.5.1)
v18.16.0
9.5.1

Thank you!

@walkerchiu
Copy link

Using aws/codebuild/amazonlinux2-x86_64-standard:3.0 (Fargate-based ECS by AWS Copilot) is still a problem about GLIBC.
I don't know if there is any update news on this issue?

Thanks!

@subinataws
Copy link
Contributor

Node 18 is now supported in amazonlinux2-x86_64-standard:5.0 https://github.com/aws/aws-codebuild-docker-images/blob/master/al2/x86_64/standard/5.0/runtimes.yml#L51

@rantoniuk
Copy link

@subinataws shouldn't that be reflected also in available runtimes docs table ?

jdub233 added a commit to jdub233/tmg-website-gatsby that referenced this issue Oct 9, 2023
@lmf-git
Copy link

lmf-git commented Nov 30, 2023

So now we start all over again for Node 20?

@mrbusche
Copy link

So now we start all over again for Node 20?

https://aws.amazon.com/blogs/compute/node-js-20-x-runtime-now-available-in-aws-lambda/

@wilhen01
Copy link

wilhen01 commented Dec 1, 2023

@lmf-git there's already an issue for Node 20 support: #631

@lmf-git
Copy link

lmf-git commented Dec 1, 2023

Is it impossible to let it gracefully upgrade without having this problem every time there's a new node version? Can you explain the main reason(s) for this design choice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests