White screen on deploying to netlify


I recently tried to deploy a portfolio website to netlify after generating a build, but keep getting the below error

Screenshot 2022-07-19 121252

It worked totally fine before that. The github repo link is given below.


I am a noobie to development so pardon any mistakes in the post and please request any additional details if required.

@coderhopeful There’s a couple of things that are a bit odd in the repository.

  1. You’ve committed your node_modules and build folders.
    To prevent that you can include a .gitignore file in the root folder that contains:

  2. In your package.json you have:

     "homepage": "/build",

    This will build your site as if it is being hosted in that folder, (which probably isn’t what you want).
    You can remove homepage or set it to "" or "/" to build for hosting at the root.

1 Like

Thank you Nathan. Totally did not notice I committed both the node_modules and build folder somehow. Normally the gitignore file is created on its own so I wonder why it was not. Anyway it works fine now Cheers!

Thanks for the debugging tips @nathanmartin! Glad everything is working now, @coderhopeful :raised_hands: