How to use Puppeteer in a NodeJS Docker Project? -Browser Not Found

Hi everyone,

I'm trying to build a custom module for my NodeJS project that uses Puppeteer to take screenshots of websites. I'm using Docker for my development environment, as recommended in the Wappler docs.

My problem is that when I run my Server Action, I get an error that the browser cannot be found. I've tried a few things I found online, like creating a custom Dockerfile to install google-chrome-stable or chromium-browser, but the installation seems to fail inside the container (I used docker exec to check, and the browser isn't there).

Has anyone successfully used Puppeteer in a Wappler Docker project?

What is the recommended "Wappler way" to install Chrome/Chromium and its dependencies so that Puppeteer can find it?

Any advice or pointers would be a huge help! Thanks so much.

You need to do some docker installs and create a custom module as others have done:

Just a quick tip. Puppeteer acts as the browser so you don't need to install Chrome and Puppeteer as Puppeteer will launch its own bundled version of Chrome.