When will CodeBuild offer nodejs v18 (or higher)?

1

As the title says. Highest nodejs runtime currently available is v16, which is quite old. https://docs.aws.amazon.com/codebuild/latest/userguide/runtime-versions.html

I have dependencies with important security updates that I cannot use with nodejs v18 or higher.

1 個回答
1

All CodeBuild images use the n command to install the Node version.

This command is available to you during the build. The delay is negligible in my experience, and it takes just a few seconds to upgrade Node.

Docs: https://github.com/tj/n

Add this to your Install phase:

n install 18
node --version

I prefer to do this regardless of the available versions in the image, just to make sure the same Node version is used in all environments.

I use .nvmrc file to maintain the version in the project.

Then in every CodeBuild project, I install the exact version this way:

n install $(cat .nvmrc)
node --version

And if you use GitHub Actions, it has support for that as well:

That way, I just need to change the version in one place.

profile picture
m0ltar
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南

相關內容