chrome-aws-lambda icon indicating copy to clipboard operation
chrome-aws-lambda copied to clipboard

Node 16.x is supported?

Open outaTiME opened this issue 2 years ago • 4 comments

I am having the following error when I try to run my lambda with node 16.x, does anyone else get this?

 "Failed to launch the browser process!\n/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n"

Environment

  • chrome-aws-lambda Version: ^10.1.0
  • puppeteer / puppeteer-core Version: ^10.1.0
  • Lambda / GCF Runtime: nodejs16.x

outaTiME avatar May 21 '22 18:05 outaTiME

I see the fix is implemented and a pull request is made. Any reason why is not merged yet?

bitconym avatar Jun 27 '22 09:06 bitconym

I've received an email from AWS that they are going to phase out the support of Nodejs12 end of 2022. I'm facing the same issue with Nodejs16 and waiting for the latest version of chrome-aws-lambda.

However, if you are looking for a temporary fix, just fake the AWS_EXECUTION_ENV, please make sure other libraries are not using the environment variable AWS_EXECUTION_ENV for anything.

exports.handler = async (_event, context, callback) => {
    //Fake the nodejs version
    process.env.AWS_EXECUTION_ENV = "AWS_Lambda_nodejs14.x";
    ...

bktan81 avatar Aug 15 '22 07:08 bktan81

FYI https://github.com/shelfio/chrome-aws-lambda-layer has switched to https://github.com/Sparticuz/chrome-aws-lambda which supports nodejs16.x

pagameba avatar Sep 30 '22 13:09 pagameba

The latest repository is https://www.npmjs.com/package/@sparticuz/chromium. Working well with node 18 and AWS Lambda.

experionsachin avatar Mar 23 '23 20:03 experionsachin