How can i add a package to the Cloudflare Pages image?

I'm migrating from Netlify to Pages, but when deploying it returns this error:
[11ty] /opt/buildhome/repo/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
Looking into the puppeteer repo i found the solution is to install the following packages:
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
https://github.com/puppeteer/puppeteer/issues/290#issuecomment-322921352 How can i add those packages in my build image?
GitHub
Chrome Headless doesn't launch on Debian · Issue #290 · puppeteer/p...
Running this example code from the README: const puppeteer = require('puppeteer'); (async() => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await pag...
2 Replies
Chaika
Chaika3mo ago
Late, but there's no such thing as "your build image". There's just two shared ones, v1 and v2. I know people have got puppeteer working on Build Image v2 before, maybe your version is just super outdated? https://discord.com/channels/595317990191398933/1020053805263507577/1108423104566415453
Adilson Santos
Adilson Santos3mo ago
Thanks for the answer, i removed the puppeteer dependency but i will check the version just in case