Tried deploying my first project, but no luck

Hi all,

I am trying to deploy a Tetris game I made in ReactJS. This is my first time deploying it with Netlify. On the terminal I get that a message saying that the build went fine, but when I used Netlify open and click on the link: https://friendly-jones-e24aad.netlify.com/. I just get a blank page.
I check the console and I got the following:

I tried deploying it again, but no luck.

Here is a log of all the activity on my terminal. Including the second time I tried deploying. Can anyone help out?

~/Desktop/Actualize$ npm install -g netlify-cli
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
/usr/local/bin/netlify -> /usr/local/lib/node_modules/netlify-cli/bin/run
/usr/local/bin/ntl -> /usr/local/lib/node_modules/netlify-cli/bin/run

> core-js@2.6.11 postinstall /usr/local/lib/node_modules/netlify-cli/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@3.6.4 postinstall /usr/local/lib/node_modules/netlify-cli/node_modules/log-process-errors/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> netlify-cli@2.40.0 postinstall /usr/local/lib/node_modules/netlify-cli
> node ./scripts/postinstall.js


Success! Netlify CLI has been installed!

Your device is now configured to use Netlify CLI to deploy and manage your Netlify sites.

Next steps:

  netlify init     Connect or create a Netlify site from current directory
  netlify deploy   Deploy the latest changes to your Netlify site

For more information on the CLI run netlify help
Or visit the docs at https://cli.netlify.com

+ netlify-cli@2.40.0
added 1074 packages from 552 contributors in 45.552s
~/Desktop/Actualize$ cd tetris
~/Desktop/Actualize/tetris$ netlify deploy
Logging into your Netlify account...
Opening https://app.netlify.com/authorize?response_type=ticket&ticket=29f33f47c028110115309872cbdbcbad

You are now logged into your Netlify account!

Run netlify status for account details

To see all available commands run: netlify help

This folder isn't linked to a site yet
? What would you like to do? +  Create & configure a new site
? Team: mail-w1maf74's team
Choose a unique site name (e.g. netlify-thinks-null-is-great.netlify.com) or leave it blank for a random name. You can update the site name later.
? Site name (optional): undefined

Site Created

Admin URL: https://app.netlify.com/sites/friendly-jones-e24aad
URL:       https://friendly-jones-e24aad.netlify.com
Site ID:   e411982a-94b0-40b9-8266-c7a7881ac1c7
Please provide a publish directory (e.g. "public" or "dist" or "."):
/Users/christiansolis/Desktop/Actualize/tetris
? Publish directory /Users/christiansolis/Desktop/Actualize/tetris/dist
Deploy path: /Users/christiansolis/Desktop/Actualize/tetris/dist
No such directory /Users/christiansolis/Desktop/Actualize/tetris/dist! Did you forget to create a functions folder or run a build?
~/Desktop/Actualize/tetris$ public
-bash: public: command not found
~/Desktop/Actualize/tetris$ netlify open
Open settings for the site linked to the current folder

USAGE
  $ netlify open

OPTIONS
  --admin  Open Netlify site
  --site   Open site

EXAMPLES
  netlify open --site
  netlify open --admin
  netlify open:admin
  netlify open:site

COMMANDS
  open:admin  Opens current site admin UI in Netlify
  open:site   Opens current site url in browser

Opening "friendly-jones-e24aad" site admin UI:
> https://app.netlify.com/sites/friendly-jones-e24aad
~/Desktop/Actualize/tetris$ netlify deploy
Please provide a publish directory (e.g. "public" or "dist" or "."):
/Users/christiansolis/Desktop/Actualize/tetris
? Publish directory /Users/christiansolis/Desktop/Actualize/tetris/public
Deploy path: /Users/christiansolis/Desktop/Actualize/tetris/public
Deploying to draft URL...
✔ Finished hashing 6 files
✔ CDN requesting 1 files
✔ Finished uploading 1 assets
✔ Draft deploy is live!

Logs:           https://app.netlify.com/sites/friendly-jones-e24aad/deploys/5e778c61fab062ac41dfbac4
Live Draft URL: https://5e778c61fab062ac41dfbac4--friendly-jones-e24aad.netlify.com

If everything looks good on your draft URL, take it live with the --prod flag.
netlify deploy --prod

~/Desktop/Actualize/tetris$ netlify open
Open settings for the site linked to the current folder

USAGE
  $ netlify open

OPTIONS
  --admin  Open Netlify site
  --site   Open site

EXAMPLES
  netlify open --site
  netlify open --admin
  netlify open:admin
  netlify open:site

COMMANDS
  open:admin  Opens current site admin UI in Netlify
  open:site   Opens current site url in browser

Opening "friendly-jones-e24aad" site admin UI:
> https://app.netlify.com/sites/friendly-jones-e24aad
~/Desktop/Actualize/tetris$ netlify deploy --prod
Please provide a publish directory (e.g. "public" or "dist" or "."):
/Users/christiansolis/Desktop/Actualize/tetris
? Publish directory /Users/christiansolis/Desktop/Actualize/tetris/public
Deploy path: /Users/christiansolis/Desktop/Actualize/tetris/public
Deploying to live site URL...
✔ Finished hashing 6 files
✔ CDN requesting 0 files
✔ Finished uploading 0 assets
✔ Deploy is live!

Logs:              https://app.netlify.com/sites/friendly-jones-e24aad/deploys/5e778c85608473cd39cbf49e
Unique Deploy URL: https://5e778c85608473cd39cbf49e--friendly-jones-e24aad.netlify.com
Live URL:          https://friendly-jones-e24aad.netlify.com
~/Desktop/Actualize/tetris$ subl .
~/Desktop/Actualize/tetris$ cd .. 
~/Desktop/Actualize$ cd tetris/
~/Desktop/Actualize/tetris$ netlify open
Open settings for the site linked to the current folder

USAGE
  $ netlify open

OPTIONS
  --admin  Open Netlify site
  --site   Open site

EXAMPLES
  netlify open --site
  netlify open --admin
  netlify open:admin
  netlify open:site

COMMANDS
  open:admin  Opens current site admin UI in Netlify
  open:site   Opens current site url in browser

Opening "friendly-jones-e24aad" site admin UI:
> https://app.netlify.com/sites/friendly-jones-e24aad
~/Desktop/Actualize/tetris$ 
~/Desktop/Actualize/tetris$ netlify deploy
Please provide a publish directory (e.g. "public" or "dist" or "."):
/Users/christiansolis/Desktop/Actualize/tetris
? Publish directory /Users/christiansolis/Desktop/Actualize/tetris/public
Deploy path: /Users/christiansolis/Desktop/Actualize/tetris/public
Deploying to draft URL...
✔ Finished hashing 6 files
✔ CDN requesting 0 files
✔ Finished uploading 0 assets
✔ Draft deploy is live!

Logs:           https://app.netlify.com/sites/friendly-jones-e24aad/deploys/5e7799a6608473a689cbf40f
Live Draft URL: https://5e7799a6608473a689cbf40f--friendly-jones-e24aad.netlify.com

If everything looks good on your draft URL, take it live with the --prod flag.
netlify deploy --prod
1 Like

hi there, welcome to Netlify. I bet we can get this working again!

First, does the app work locally? that is always the first thing to try.

Second, thanks for showing us the errors you can see in your browser console. If you hover over the line where it complains about the manifest.json you should see this: https://friendly-jones-e24aad.netlify.com/%PUBLIC_URL%/manifest.json

Clearly that shouldn’t be there. I am not sure what is causing the issue, but that is something you’ll want to work through.

Let us know how it goes!

Hi Perry!

Yes it does (localhost 3000). I’ll give it a look again. I am confused as to what shouldn’t be there? Can you please elaborate.

Thanks,

Christian

let me try and explain - when i see something like %PUBLIC_URL% on a project that has been built and live, this almost always means that some placeholder somewhere wasn’t switched out for a variable or setting of some kind.

Here is a great guide with some basic troubleshooting:

and if that doesn’t help, please link us to a build log so we can try and figure out what the problem is.

we’ll get this working, I’m sure of it!

Hi there!

I was not successful, unfortunately. I have provided a link with all of my logs. None of them display any type of error, which I found strange.

https://app.netlify.com/sites/friendly-jones-e24aad/deploys

The deploy doesn’t check the links on your website. That’s up to you.

Just a FWIW, you may want to reconsider your use of core-js, seeing as how the person most responsible for it is going to jail for awhile.

My two cents.

Tacoholic,

when you build the site locally, does it work?

also, we are seeing the exact same issue on a different thread:

take a look at that one, where we are troubleshooting the same problem.

From your logs:

This is the issue - You’re publishing the unbuilt code. You need to run npm run build (or yarn build if you’re using Yarn), then publish the build directory (should be /Users/christiansolis/Desktop/Actualize/tetris/build/ on your system).

Did that, but still getting a blank page. I have been reading that apparently it’s kind of a mission to get a page deployed with React. Not sure if that is true or not.

tacoholic, i went kind of down the rabbit hole with someone else who had exactly the same problem.

can you read through this and see if this is helpful at all? in @maggieprice’s case it ended up being a dependency that was causing all the trouble. Could be the same for you - or any of the other things we tried! But I promise you we can solve this problem and get your site online :slight_smile:

Hello Tacoholic,

I had a similar situation to you, everytime I deployed my react application to Netlify it kept resulting in a blank screen. I managed to find a solution. On your package.json, if you have the following:

"homepage": "https://(github account).github.io/(github repository)"

Delete this line and then do npm run build and follow the Netlify deploy process.

This worked for me.

I hope this helps.

1 Like

thanks for that advice, steven! @Tacoholic - is your site working now?

No it is not. :frowning:

Here is my repo if anyone is interested in looking at it.

Hi @Tacoholic! I’ve just cloned your repo, created a site on Netlify and it works like a charm: https://brave-leakey-596220.netlify.app/

Maybe try creating a fresh site?

1 Like

I was receiving similar errors and ended up just deleting all my favicon’s and manifest files. The errors went away, but I don’t know if that’s really a good thing because I’m still stuck with a blank page and no errors in the console (see below)

Everything works fine locally and my Deploy Log says my site is live, but without any errors showing up I’m pretty lost… :weary: please help! Live Link | Deploy Log | Github Repo

so, when I pop open your site and look in the developer console, I see this:

Is it possible that things are working to expected and there isn’t any content to be rendered?

Thanks for replying Perry! Got everything up and running now :slightly_smiling_face: actually realized my ‘.toml’ file wasn’t targeting my build directory :sweat_smile: