Djaenike
Djaenike

Reputation: 1865

Error setting up react-snap for Reactjs/nodejs app hosted on heroku

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

Upvotes: 1

Views: 609

Answers (0)

Related Questions