Open thecoconutstudio opened 4 years ago
same problem !
I managed to fix this finally. I presumed you cloned the repo like I did.
Instead of using npm install
I ran yarn install
I also ran
yarn add @serverless-chrome/lambda gm puppeteer-core superagent aws-sdk url
yarn add --dev serverless-plugin-chrome
Not sure if it was in that order, but it definitely started me on the right direction. I then had some s3 storage permission issues...
I have alway this problem with yarn
"errorMessage": "Unable to start Chrome.
do you change something in the serverless.yml ?
I have the same problem ...
I think there is also another problem, AWS Lambda does not support node8.10 anymore. Just node12.x ...
Same here
Hi if you want an other solution it work for me with this rep : https://github.com/alixaxel/chrome-aws-lambda
and prebuid the layer like this
#!/bin/bash
set -e
rm -fr chrome-aws-lambda
git clone --depth=1 https://github.com/alixaxel/chrome-aws-lambda.git
cd chrome-aws-lambda
mkdir -p ../chrome-layer
make ../chrome-layer/chrome_aws_node10x.zip
ls -lah ../chrome-layer/chrome_aws_node10x.zip
rm -fr ../chrome-aws-lambda
echo 'Layer created successfully!'
then use the layer on your serverless.yml (with runtime: nodejs10.x)
layers:
chromePreBuilt:
package:
artifact: chrome-layer/chrome_aws_node10x.zip
I have the same problem ...
I think there is also another problem, AWS Lambda does not support node8.10 anymore. Just node12.x ...
I did have this same problem, but managed to fix it with the steps above. Also working with "runtime": "nodejs8.10"
@vincentcau that repo worked for me too straight out of the box!
Oh hey I totally missed this. This lambda should work now. I had the same issue a few months ago
Thank you so much for putting together your article. I too have been struggling with all the different examples online. Hopefully your solution will end up working. However I'm getting an Error when navigating to the end point
Unable to start Chrome