Puppeteer on Render

im trying to run Puppeteer and im getting this error
“UnhandledPromiseRejectionWarning: Error: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (1045629).”

–package.json
“dependencies”: {
“axios”: “^1.1.3”,
“cheerio”: “^1.0.0-rc.12”,
“express”: “^4.18.2”,
“puppeteer”: “^19.0.0”
}

Hello,

It looks like you’ll need to make sure your build process installs Chromium, none of Render’s services come with Chromium pre-installed. It looks like your error message is suggesting you use npm to install Chromium.

Alternatively, I do see Puppeteer has a Docker image that includes Chromium, see https://pptr.dev/guides/docker. That page includes a link to a Dockerfile you could use as a starting point to deploy to Render.

Regards,

Matt

This resolved the issue to me

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.