React Component is not rendering after deploying to Netlify. It works on local machine. component not rendering at all. When I check in React dev tool, I see the state that jokes are updated but nothing in UI.
is it possible that you’re missing some content from your upload? did you add it to git?
12:04:59 PM: Creating deploy upload records
12:05:01 PM: Starting post processing
12:05:01 PM: Post processing - HTML
12:05:01 PM: Post processing - header rules
12:05:01 PM: Post processing - redirect rules
12:05:01 PM: Post processing done
12:05:02 PM: Site is live
according to your deploy log, we deployed your whole site in 3 seconds. netlify is FAST, but not that fast! I am wondering if something got left out.
Also, This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem
First I deployed from GitHub but that did not work (same issue), then I installed netlify-cli and deployed from the computer.
These are the steps:
npm run build
npm install netlify-cli -g
netlify deploy --prod
ok, so in your latest deploy, do things work as intended? If not, does your LOCAL copy work as intended? If not, that’s where you should start debugging If so, it’s quite a mystery that deploying that local copy doesn’t work as well as your local, unless your site requires a server to do some computation at browse time? If that is the case - please check out our hosting philosophy here:
If not, please let us know how you run locally and what the exact difference is - “react component is not rendering” isn’t quite helpful in understanding the error - perhaps instead “I see this locally (screenshot) and on netlify this at the same URL (screenshot). In the browser dev tools I see more warnings on Netlify, and I’ve quoted those errors that I don’t get when running locally…”
Similar to @eralpkor, could you please check which version of Node you’re building with locally and make sure you’re building with the same version on Netlify using the docs I linked above? If that doesn’t help, it’d be great if you could share your Netlify url and repo if it’s public- thank you!
I’m also having this issue where my React components are displaying locally but not on the netlify’d version. I’m using node v12.9.0 and have updated the Node Environment for the site to: NODE_ENV — 12.9.0 , but no luck. Thanks for any help you can provide!
I checked your site but did not see that you have the NODE_ENV env var set herehttps://app.netlify.com/sites/wonderful-joliot-d08f99/settings/deploys#environment. Can you try setting it and see if that helps?