React Application Builds & Deploys into a Blank Page

I’m relatively new to Netlify and I’ve come across a barrier. When I build and deploy a create-react-app to Netlify I don’t get any errors, but the result is a blank page.

This is my the public Netlify page: https://admiring-shockley-3c14e8.netlify.com/

I get one warning when I inspect the page: "Uncaught SyntaxError: Unexpected token <"

Drilling into the code here:
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><title>Case Convertor</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/caseconverter/static/js/main.217fe3f5.js"></script></body></html>

Nothing crazy, right?

I’ve deployed to Github Pages with no errors or issues. Code to my Github Repo can be found here: https://github.com/rickknowlton/caseconverter

hi @rickknowlton - did you take a look at this post?

if you search for Unexpected token <" you’ll see there are a couple of times this error has come up - if none of those help, we can take a closer look :muscle:

So, I was able to solve the issue (and I’m not sure on the “why”) by changing the homepage listed in my package.json to “.”

Any of y’all have an explanation for this out of curiosity?

hi @rickknowlton - that’s interesting. Does it break reliably when you change it back?

if no - this might be something unrelated. If yes, can you post your before and after package.json please?

@perry I was facing the same issue. @rickknowlton’s solution fixed it😲 You should really look into it. If I change it back it breaks.

The only change I made to my package.json file was changing the value I had in the homepage entry to “.”

Before:

{
  "homepage": "https://avpaul.github.io/outcode",
}

To:

{
"homepage": ".",
}

so, did a few test deploys to see if I could break things again. initially my package.json featured this little homepage field:

{
  "homepage": "https://rickknowlton.github.io/caseconverter",
}

when I changed the homepage to “.” I could then deploy. that said, I tried to go back and see if changing it to the original would halt the build again, but it didn’t. I also removed the homepage field from the package.json altogether and it had no effect. so, now I’m unsure as to what could have happened originally. maybe some internal hiccup?

this seems to be an known issue, potentially?

well that’s interesting! thanks for digging in! kind of a weird bug, right?

yeah! I’m not a super expert on this, but it does seem very odd. We’ll definitely make note of this, but you have a workaround for now, correct?