1

I'm trying to set up react-snap in my reactjs project being hosted on heroku. I followed the instructions on the react-snap READme and have included the following in my client-side index.js:

import { hydrate, render } from 'react-dom';
const rootElement = document.getElementById('root');
if (rootElement.hasChildNodes()) {
    hydrate(<App />, rootElement);
} else {
    render(<App />, rootElement);
}

When I try to deploy to heroku i get the following error:

Error: Failed to launch chrome!
.../client/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

I ran npm i puppeteer on the client side, and am able to locate the puppeteer directory, but it only includes win64-722234. Is there something special I need to do to get the linux directory to install?

I am developing in a windows environment

Djaenike
  • 1,645
  • 5
  • 21
  • 32
  • Im also facing the same issue. Installed this as --only=dev and wasn't expecting this to be pushed. Hoping this will bump the issue. – Aquious May 22 '20 at 08:41

0 Answers0