jamesknelson / create-react-app

MIT License
14 stars 0 forks source link

universal-react-scripts in production gives an error #3

Open DB-Alex opened 5 years ago

DB-Alex commented 5 years ago

Hi James,

I have an error when i put the SSR in production and I really don't understand what is going on. I hope you have a few minutes for me since I really want to put the server live today.

This is the error in product, on my localhost everything runs smooth.

Uncaught SyntaxError: Unexpected token < main.1bd1e73a.chunk.js:1 Uncaught SyntaxError: Unexpected token <

See also the screenshots attached.

I hope you can point me in the right direction.

Screenshot 2019-08-01 at 11 57 12 Screenshot 2019-08-01 at 11 57 30
DB-Alex commented 5 years ago

I have little progress i think, but now its fully crashing:

TypeError: handler is not a function at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:49:9) at /worker/worker.js:783:7 at /worker/worker.js:766:11 at _combinedTickCallback (internal/process/next_tick.js:132:7) at process._tickDomainCallback (internal/process/next_tick.js:219:9)

Screenshot 2019-08-01 at 15 23 34
jamesknelson commented 5 years ago

Based on the first image, for whatever reason, your server is serving an error page instead of main.something.chunk.js - it's hard to say why. Does the file actually exist in your build directory?

As for "handler is not a function", that's a little more cryptic.

Do you have a URL I could take a look at?

DB-Alex commented 5 years ago

Let me check if I can prepare something