Hello,
After my ticket ENOENT problem only on netlify - #6 by hrishikesh I change of package for playwright and still have an issue. Playwright do not find chromium on netlify, or in local using netlify dev.
You can reproduce the issue doing this command :
curl --request POST \
--url https://prismatic-cupcake-42f946.netlify.app/api/creation/eurl \
--header 'Content-Type: application/json' \
--data '{
"revendicationEpoux": {
"epoux": {
"lastName": "obama",
"address": "3 rue de la fantaisie",
"city": "St jean de mont",
"zipCode": "44000"
},
"fondateur": {
"firstName": "barack",
"lastName": "obama",
"address": "3 rue de la fantaisie",
"city": "St jean de mont",
"zipCode": "44000",
"share": 600
},
"company": {
"address": "1 rue de washington",
"city": "Nantes",
"zipCode": "44000",
"capital": 10000,
"shareValue": 20,
"name": "Obama Care"
},
"document": {
"date": "2022-12-31"
}
}
}'
The error message will be
{
"errorType": "Error",
"errorMessage": "ENOENT: no such file or directory, open '/var/task/netlify/functions/creation/bin/chromium.br'",
"trace": [
"Error: ENOENT: no such file or directory, open '/var/task/netlify/functions/creation/bin/chromium.br'"
]
}
If you give a gitlab account, I can give you access to the code to reproduce it locally using netlify dev
command
The code work perfectly using jest with npm test
PS : I already test this solution but do not work for me GitHub - netlify-labs/netlify-functions-headless-chrome: Run headless chrome in Netlify functions