node-html-to-image: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

Hi, A project with NodeJS latest version with express. In localhost is everything fine and working perfectly, but when I deploy on Heroku and try to run the function I get this error.

Failed to launch the browser process! /app/node_modules/node-html-to-image/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

Its something chromium related, do you have any fix for this?

thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@smallbitt I had got the same error but it was on GCP Ubuntu VM.

https://medium.com/@cloverinks/how-to-fix-puppetteer-error-ibx11-xcb-so-1-on-ubuntu-152c336368

This fixes the issue but I doubt how will you use it on Heroku… you need access the command line.

I close this issue, feel free to reopen it if you have further information.