Site is live, but sill blank screen (react app)

Do i run the above command in the public folder?

It’s not a command. That is what you put into the _redirects file (the contents of the file)

AWESOME! THANK YOU! my page loads now:

I really appreciate your help :raised_hands:
this is my first attempt building a react app, do you have any recomendations?

1 Like

Hey there, @shagariboy :wave:

Not react specific per-say, but if you are looking to learn a bit we do have our Jamstack Explorers program. Check it out:

1 Like

Hello, I’m also having the issue of a blank page appearing even though my react act successfully deployed. I’ve read through the above comments but am still unsure what the issue is. Below are my links:
Github: GitHub - Ellie575/react-weather-app-reimagined

Would appreciate any insight/feedback into the matter. Thanks.

You’re site is not requesting any kind of JavaScript required by React:


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
      content="Web site created using create-react-app"
    <title>Weather App</title>
    <div id="root"></div>

It appears you’ve modified this file: react-weather-app-reimagined/index.html at main · Ellie575/react-weather-app-reimagined · GitHub than what React provides you. You’d have to reset that file.

Hi @hrishikesh,
Thank you for your speedy response.

As suggested, I tried resetting this file and deployed again, but it is still displaying a blank page. There is a note in this html file as follows:

<noscript>You need to enable JavaScript to run this app.</noscript>

Is there an extra step I need to take to enable JavaScript? Sorry for the simple questions, I am new to coding.

Hey @Ellie575

The <noscript> tag is normal.

What value is set for the publish directory in your build settings? Based on the HTML comments in the file e.g.

  Notice the use of %PUBLIC_URL% in the tags above.
  It will be replaced with the URL of the `public` folder during the build.
  Only files inside the `public` folder can be referenced from the HTML.

  Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
  work correctly both with client-side routing and a non-root public URL.
  Learn how to configure a non-root public URL by running `npm run build`.

I believe you may have public set as the publish directory. The default output directory for React is build (see documentation here and here) and as such, this is the value you need to use as the publish directory.

Hi @coelmay,

You are correct, my publish directory was set as public. I just tried setting it as build as suggested, and it failed to deploy. The log is as follows.:

1:40:05 PM: Build ready to start

1:40:17 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)

1:40:17 PM: build-image tag: v4.8.0

1:40:17 PM: buildbot version: 29e546ddee264a16af472b38ccba15b350150213

1:40:18 PM: Fetching cached dependencies

1:40:18 PM: Starting to download cache of 581.9KB

1:40:18 PM: Finished downloading cache in 254.540144ms

1:40:18 PM: Starting to extract cache

1:40:18 PM: Finished extracting cache in 13.79569ms

1:40:18 PM: Finished fetching cache in 268.708673ms

1:40:18 PM: Starting to prepare the repo for build

1:40:18 PM: Preparing Git Reference refs/heads/main

1:40:18 PM: Parsing package.json dependencies

1:40:19 PM: No build steps found, continuing to publishing

1:40:19 PM: Creating deploy upload records

1:40:19 PM: Failing build: Failed to build site

1:40:20 PM: Failed during stage 'building site': Deploy directory 'build' does not exist

1:40:20 PM: Finished processing build request in 2.560411957s

I’ve also changed the build command as npm run build in the past, but it also failed to deploy.

If you are deploying a React app, you will need a build step as you will see mentioned in the documentation I linked to.

What are the build settings you are using? Can you share the repository you are deploying?