Chrome-aws-lambda stopped working, possibly due to different version of @netlify/build

I was running chrome-aws-lambda@5.5.0 in lambda functions. Yesterday it stopped working for new builds.

Build and deploy is successful, but in runtime I get the following error:
/tmp/chromium: error while loading shared libraries: cannot open shared object file: No such file or directory

The only thing that seem to change is @netlify/build. Last working version was 20.3.0. It doesn’t work on 20.3.1 and 25.0.1. I tried with both Ubuntu versions. I am using NodeJS v16.13.1. site:

Any idea what might break things? Is it possible to set @netlify/build version?

1 Like

Hi @ibanic

According to the npm package page for chrome-aws-lambda the latest version is 10.1.0. Have you tried updating to the latest version?

If not, you might need to file and issue on the repository (it is not a Netlify package.)

1 Like

Hi, yes I have tried the latest version. It doesn’t work because compiled lambda .zip package is more than 50 mb.

Netlify builds the functions using GitHub - netlify/zip-it-and-ship-it: Intelligently prepare Node.js Lambda functions for deployment which bundles all dependencies. The outcome, in your case, is larger than that permissible by AWS. In order to deploy the function, you will need to decrease the size by reducing the dependencies it uses.

Unfortunately that is not possible without losing required functionality. Older version results in less than 50 mb.
It doesn’t look like a problem with chrome-aws-lambda because older cached builds still work.
Is it possible to change @netlify/build version?

Under Site settings > Build & deploy > Continuous Deployment > Build image selection you can choose between the Xenial and Focal build images. You can also change the node version used in a build image.

However, this is possible more to do with the node version used to build functions which is (potentially) different to that used used in the build image. This node version is controlled via the AWS_LAMBDA_JS_RUNTIME environment variable and accepts nodejs10.x, nodejs12.x, and nodejs14.x as per this documentation.

On 13 December, node 14 became the default for functions, which may explain the issues you are seeing

I am running into the same issue with regards to netlify/build versions

I have answered on the thread you created @zackseuberling