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
./build
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…”
There are no warnings on either side (locally or Netlify). And if you open the React devtools on Netlify site you can see the state of jokes but it won’t render on browser but it works fine locally.
Screen shot from local computer:
And from Netlify: I have to post it again because new users can only embed ones.
mine too , I have same issue like yours, have you fix this issue ?
if not , I hope someone can help us, cause it works fine in local, when it deploys doesn’t show anything
Hey @rbayuokt,
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!
Hey @eralpkor,
You can try setting the NODE_ENV variable to that number as described here since you’re building on Netlify with a slightly different version:
But this is more likely an issue with your connection to Heroku:
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?
Hi @Dennis, thanks for the reply! I double-checked the NODE_ENV env var is now set, but unfortunately that did not help – the deployed page is still blank! Any other suggestions?
Hi @perry , Thanks for replying. I’m not getting any error messages about missing files in either of my projects when building on Netlify, so unfortunately, this didn’t help in my case.