puppeteer-lambda-starter-kit icon indicating copy to clipboard operation
puppeteer-lambda-starter-kit copied to clipboard

Add support for Node v8 in aws lambda

Open inian opened this issue 7 years ago • 2 comments

Changing the environment to node v8 and deploying doesn't work.

inian avatar Apr 15 '18 02:04 inian

I recommend that the Docs are changed to state that this package only currently works for Node 6.10

tomardern avatar May 12 '18 15:05 tomardern

as mentioned on #25 to run on 8.10 we just have to update the nodejs on .babelrc("8.10") and on serverless.yml (nodejs8.10) and change the handler to:

exports.handler = async (event) => {
  let result;
  let browser;
  try {
    browser = await setup.getBrowser();
    result = await exports.run(browser);
  } catch (err) {
        console.log(err);
        return err;
  }
  return result;
};

cirdes avatar Jul 30 '18 20:07 cirdes