Open VexyCats opened 3 years ago
No help or suggestions from the team? @stereobooster @badsyntax @pushred
I just ran into this. Turned out it a was console.log
causing the problem. I found it by setting concurrency: 1
in package.json and looking at the place it was trying to render right before it failed.
Oh thanks for the suggestion. Will attempt to remove all console.logs
@VexyCats, ran into the same problem, currently debugging. Did you solve it?
Sorry for the aside, but what is in your "/src/sw-build.js" script? Looks like we have a similar setup, and i'm having issues with static files generated by react-snap not being in the precache (I assume that's what you're doing there?)
I was having the same problem. adding concurrency: 1
to react-snap config on package.json
fixed it.
Update: managed to increase concurrency to 4, and it still works. This issue appears to be related with Apple M1 processors maybe? I only started having it after switching from an Intel based one.
Bug Report
Current Behavior Running my scripts to build the CRA gives this error in the terminal.
Node version: 10.15.3 React-snap version: 1.23.0
scripts:
Also for some reason it seems to show the wrong pages in the terminal - for example:
(this happens for all routes it prerenders)
Its current pre-rendering /createstore route, but then it shows as /404. Not sure if this is related.
Doing some research some people have suggested its due to using Lambda functions to return data from the app.
I am using lambda functions, but the answers provided from puppeteer doesn't seem to apply. I'm simply querying an API that runs a lambda to return JSON data from a database. Query is happening from the frontend.
Are there some changes I need to make so snap can prerender my pages even though they are calling an API?