aws-codebuild-docker-images icon indicating copy to clipboard operation
aws-codebuild-docker-images copied to clipboard

Please Add Support for NodeJS 16

Open iamderrick opened this issue 5 years ago • 38 comments

NodeJS 16 entered active long-term support very recently. Can you please add this runtime to the codebuild images?

iamderrick avatar Oct 27 '21 21:10 iamderrick

👍

workaround

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

koooge avatar Nov 23 '21 12:11 koooge

If the images use version managers under the hood, why limit the number of available runtime versions to a static set? Couldn't these images just be updated to pass specific versions on to the underlying version managers?

I imagine this could even be backwards compatible with the existing implementation and require a lot less ongoing maintenance of this repository. And a lot fewer workarounds from CodeBuild users.

Specific versions like this would pass straight thru to the nodejs n version manager:

phases:
  install:
    runtime-versions:
      nodejs: 16.13.1

and the image could still provide "supported" versions like 12, 14, 16:

phases:
  install:
    runtime-versions:
      nodejs: 14

nhaynes avatar Dec 30 '21 19:12 nhaynes

Just wanted to chime in and mention that I was able to use @koooge workaround to install a specific version of Node.js using CDK. You can see the relevant code in my template repo. Thank you!

spencerbeggs avatar Feb 11 '22 16:02 spencerbeggs

waiting for support nodejs version 17

chunyang-sph avatar Apr 14 '22 04:04 chunyang-sph

bump! 16 has been in LTS for a while now...

critesjm avatar Apr 19 '22 16:04 critesjm

Bump. Would be really good to have this...

wilhen01 avatar May 03 '22 10:05 wilhen01

They're getting closer, it seems. NodeJS 16 runtime is now supported for Lambdas. However, it is not yet available for codebuild.

Chase-Dickerson avatar May 18 '22 17:05 Chase-Dickerson

FYI, this seems to work now. docs still not updated but I tried it just now:

  install:
    runtime-versions:
      nodejs: 16


[Container] 2022/05/23 14:01:37 No commands found for phase name: install
--
7 | [Container] 2022/05/23 14:01:37 Processing environment variables
8 | [Container] 2022/05/23 14:01:37 Selecting 'nodejs' runtime version '16' based on manual selections...
9 | [Container] 2022/05/23 14:01:37 Running command echo "Installing Node.js version 16 ..."
10 | Installing Node.js version 16 ...
11 |  
12 | [Container] 2022/05/23 14:01:37 Running command n $NODE_16_VERSION
13 | copying : node/16.15.0
14 | installed : v16.15.0 (with npm 8.5.5)

Edit: don't recommend this yet. it only works sometimes and seems to be random chance if the build server supports it yet or not

zoellner avatar May 23 '22 14:05 zoellner

Using a version manager isn't a viable solution to picking a version.

  1. It increases already long build times / startup for an already slow service.
  2. I'm paying for build times. See problem 1
  3. Builds running in a VPC without an internet connection cannot pull and build new versions of node

AMI2022 isn't supported on codebuild. AMI2 is dead along with CentOS. Ubuntu images do not have latest software available even a year after it's been released. Please support your own products.

mneil avatar May 23 '22 16:05 mneil

  • Saw that Lambda supports Node 16 now, as of 10 days ago.
  • Created PR to update Lamdba runtime, updated the CodeBuild runtime at the same time.
  • PR runs on CodeBuild, uses Node 16 as mentioned https://github.com/aws/aws-codebuild-docker-images/issues/490#issuecomment-1134723620.
  • Merged PR.
  • Other PRs are now failing saying Unknown runtime version named '16' of nodejs.

So it seems that it isn't exactly fully rolled out. Very unfortunate it's only intermittently working, builds should be reproducible.

DylanVann avatar May 23 '22 18:05 DylanVann

I also get 'nodejs16.x' runtime is not supported as a Lambda error when downgrading just CodeBuild.

Is there some way to clear the pool of build machines we're using and just get ones that support Node 16?

DylanVann avatar May 23 '22 18:05 DylanVann

Tried in region ap-southeast-2... nodejs: 16 isn't available yet

jpduckwo avatar May 24 '22 06:05 jpduckwo

Yesterday morning it was available. At night and now it is not. Looks like they are having some issues updating the version.

arturoribessanz avatar May 24 '22 09:05 arturoribessanz

Yesterday morning it was available. At night and now it is not. Looks like they are having some issues updating the version.

Finally... it's good to know that they are working on it! I was checking https://docs.aws.amazon.com/codebuild/latest/userguide/available-runtimes.html#linux-runtimes every week to see if it's available.

maheshsamudra avatar May 25 '22 04:05 maheshsamudra

eu-central-1 also does not support it yet... really disappointed since the application won't build at pipelines and therefore blocks the use of node 16 and npm 8.

recs182 avatar May 25 '22 18:05 recs182

+1. It's a nice feature because Node 12 will go EOF at April 2022. AWS Lambda already have Node 16 available.

brazilianbytes avatar May 25 '22 20:05 brazilianbytes

This is pressing. We went through the deal of upgrading lambdas to 16 and we use codebuild to build our lambdas. Hope there's a fix soon.

jcuna avatar May 30 '22 20:05 jcuna

+1

workaround

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

This workaround works well and does not add a lot of time to the build process.

arturoribessanz avatar May 31 '22 05:05 arturoribessanz

nodejs: latest is defaulting back to v12.22.2 again. It was pulling 14+ for the last few months.

h5aaimtron avatar Jun 02 '22 21:06 h5aaimtron

nodejs: latest is defaulting back to v12.22.2 again. It was pulling 14+ for the last few months.

I'm sceptical :) What region, and what is your build config?

jpduckwo avatar Jun 02 '22 22:06 jpduckwo