Open usfkhoury opened 3 years ago
To Note that if I run the same code with chrome-aws-lambda
but without const results = await lighthouse('https://google.com', options);
, I get the expected result:
"Google"
So maybe I'm doing something wrong with the deployment of the layer or there's an issue with lighthouse
using chrome-aws-lambda
Having same problem here.
Same error message.
I also ran into this Lambda size limit issue and might have a possible solution for:
- How can I run the original chrome-launcher lambda without running into the lambda size limitation issue?
I was able to remove some additional files that were not necessary located in the node_modules/chrome-aws-lambda/bin
directory. Since we are already copying them with the node decompress-binary.js
script.
"name": "lighthouse-layer-nodejs",
"private": true,
"version": "0.0.1",
"description": "lighthouse layer nodejs",
"engines": {
"node": ">= v12.18.0"
},
"scripts": {
"postinstall": "node decompress-binary.js && rm -rf ./node_modules/chrome-aws-lambda/bin"
},
"author": "Erez Rokah",
"license": "MIT",
"homepage": "https://github.com/adieuadieu/erezrokah/lighthouse-runner/layers/lighthouse/nodejs",
"dependencies": {
"axios": "^0.19.2",
"chrome-aws-lambda": "^7.0.0",
"chrome-launcher": "^0.13.0",
"google-spreadsheet": "^3.0.13",
"lighthouse": "^7.0.0",
"lighthouse-logger": "^1.2.0",
"readline": "^1.3.0"
}
}
I'm new to lambda and trying to deploy and run lighthouse on AWS Lambda but whenever I try to run
yarn deploy
the package I get the below error:This is due to the uncompressed chromium binary, so I then tried using the
chrome-aws-lambda
module instead of thechrome-launcher
with the below lambda function and environment variables: index.js:Environment Variables: But I'm now getting this error:
So my question is:
chrome-launcher
lambda without running into the lambda size limitation issue?chrome-aws-lambda
to get the lighthouse results?