You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using node-html-to-image for two years and it worked well. Recently I updated all dependencies including this package to v4.0.0 and it doesn't work any more.
Call nodeHtmlToImage() it just thrown an error:
ERROR 1016 nodejs.Error: Unable to launch browser, error message: Could not find Chrome (ver. 119.0.6045.105). This can occur if either
1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: /root/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: /root/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at Cluster.<anonymous> (/app/node_modules/puppeteer-cluster/dist/Cluster.js:119:23)
at Generator.throw (<anonymous>)
at rejected (/app/node_modules/puppeteer-cluster/dist/Cluster.js:6:65)
I googled every error message, read many pages in GIthub and Stack Overflow and tried different version of nodejs and Chrome but got nothing.
Eventually I modified package.json with node-html-to-image ^3, got ERROR 54 nodejs.Error: Unable to launch browser, error message: Could not find expected browser (chrome) locally. Runnpm install to download the correct Chromium revision.
Then I run node node_modules/puppeteer/install.js and enerything is GOOD now.
I have no idea what happened.
------ BACKGROUND ------
I use a Docker container to run my app. The base image is node:20-bullseye-slim and installed Chrome manually. My Dockerfile:
Did you check the troubleshooting section of Puppeteer documentation https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md? Since, I updated Puppeteer you might do some changes on your part. That is why I made a major version to warn about the fact it might contains breaking changes on puppeteer side.
I have been using node-html-to-image for two years and it worked well. Recently I updated all dependencies including this package to v4.0.0 and it doesn't work any more.
Call
nodeHtmlToImage()
it just thrown an error:I googled every error message, read many pages in GIthub and Stack Overflow and tried different version of nodejs and Chrome but got nothing.
Eventually I modified package.json with
node-html-to-image ^3
, gotERROR 54 nodejs.Error: Unable to launch browser, error message: Could not find expected browser (chrome) locally. Run
npm installto download the correct Chromium revision
.Then I run
node node_modules/puppeteer/install.js
and enerything is GOOD now.I have no idea what happened.
------ BACKGROUND ------
I use a Docker container to run my app. The base image is
node:20-bullseye-slim
and installed Chrome manually. My Dockerfile:My puppeteer args is:
The text was updated successfully, but these errors were encountered: