aws-puppeteer-lambda
aws-puppeteer-lambda copied to clipboard
extract.js: SyntaxError: Unexpected token (
I have this issue with a basic example:
node_modules/aws-puppeteer-lambda/src/extract.js:5 module.exports = async () => { ^ SyntaxError: Unexpected token (
It happens on the line const { extract, cleanup } = require('aws-puppeteer-lambda');
@PunkHaz4rd Which version of Node.js are you using in your Lambda? I believe this package only works with 8.x (as async
/await
is not supported before 8.x).
That looks like a node version issue. v8 as @iamakulov said should do it.