Netlify function with puppeteer breaks if I make any changes

I did try that solution but needed to do a few more things.

I ended up installing the latest sparticuz chromium package, the latest puppeteer-core, then adding:

[functions]
  node_bundler = "esbuild"
  external_node_modules = ["@sparticuz/chromium"] 

to get running locally on netlify dev i had to install

npx @puppeteer/browsers install chromium@latest --path /tmp/localChromium

to get the chromium path

and also in wsl2 install the following packages:

sudo apt install libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libpangocairo-1.0-0 libgtk-3-0

but now, live on netlify, the function times out after 10s just when getting the title of a page

On Pro and above plans, the timeout can be creased to 26 seconds if that would help your case.

Thanks @hrishikesh but that isnt an option for me atm. I’ll look at alternatives or a way to speed up the function.

Where can this be done?

We need to do it from our end, if you let us know the site name.

Thanks, my site id is ac41d652-6393-4472-b739-3f1a802d1029

hiya :wave:t6: thanks for reaching out. Your site is already set to a function cap of 26s. Can you please re-deploy if you are not seeing this take effect?