React snap and react routes don't seem to work properly together and giving errors . Here is the error
-- ASYNC --
at Frame.<anonymous> (/Users/apple/Desktop/xyz-web-app/node_modules/puppeteer/lib/helper.js:111:15)
at Page.goto (/Users/apple/Desktop/xyz-web-app/node_modules/puppeteer/lib/Page.js:629:49)
at Page.<anonymous> (/Users/apple/Desktop/xyz-web-app/node_modules/puppeteer/lib/helper.js:112:23)
at fetchPage (/Users/apple/Desktop/xyz-web-app/node_modules/react-snap/src/puppeteer_utils.js:232:22)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7) name: 'TimeoutError' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xyz-web-app@0.1.0 postbuild: `react-snap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xyz-web-app@0.1.0 postbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2019-06-24T09_10_08_310Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xyz-web-app@0.1.0 build:dev: `REACT_APP_API_ENV=dev REACT_APP_DEV_ANALYTICS=true npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xyz-web-app@0.1.0 build:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2019-06-24T09_10_08_348Z-debug.log
I used react snap with a simple web app which had no routes in it and there was no error postbuild and I could see the 200.html file generated but with the app that we have in production and has numerous routes in app.js seems to throw these errors .I could not figure out as why there are timeout errors in this case and how we can overcome this .
Our routes are somewhat similar to this "react-snap and react-router together make a problem"