404 page not found error

I am having trouble resolving this page not found 404 error on my site that’s been deployed. It is a game build with a blockchain integration. I tried running through the steps outlined in Dennis’s post here:

with no resolution still. I am also a beginner so I recognize I could just be doing something wrong here.

After I can get this successfully deployed, next I also might need some help setting it up to connect with my server/ec2 instance on AWS so that the site can make calls to the server.

Hi grikrash,

Thanks for reaching out and welcome to Netlify’s Support Forums.

Could you try removing the Build command: npm run build and see if the site deploys properly? Looks like there’s nothing to build and so the command can be removed.

1 Like

Thanks for your response, removed! Sadly it’s still not loading up properly.

@grlkrash Did you trigger a new deploy?

Changing the Build settings doesn’t take effect until a new build is run.

Yes, the site is deployed through github (is that what you’re asking me?) sorry new to this

@grlkrash I’m asking if after you made the configuration change, you caused a new build to run.

You could do this by pushing a new commit to the repository, or using the Netlify UI.

It’s common when people are told to adjust their configuration that they make the instructed change, but forget to trigger a new build, and then they check their site and believe nothing has changed.

But the configuration changes only take effect when a new build is run, so if you haven’t done that, you should and then report back.

How can I re deploy this?

Done! So I can see the beginning of the game loading, but then I’m getting this ERROR: Failed loading file ‘index.pck’

Also, the other part of the game (the web3 integration) isn’t loading up and I have an inkling of why (they are in separate folders on the GitHub repo and I can only setup one publish folder) - how can I work around this?

If you check the network tab of your browser you will see it’s trying to load:

That file does not exist:
https://startling-sable-002dc6.netlify.app/index.pck

To fix, you would make sure the file does exist in the location it’s being requested from.

You can use the Deploy file browser to see what you’ve deployed.

You restructure your project so that it produces a single folder than can be served.

You won’t be able to serve anything in a directory higher than the Publish directory.

thank you so much!! just made those fixes and triggered a new deploy, hopefully everything is fixed!!

I have just one more question - is it possible to get one page of the deployed site pointed to a different domain than the rest ?

Sadly I am getting another 404 error.

Once I uploaded the missing file, the game played perfectly!

Then I went in my GitHub and took all of the files out of their subfolders, re-triggered the deploy and now another 404 error. – do I need to erase the publish directory line? will it publish from my github repo as is and run through all of the files with no folder?

Also, I think only the html and on the sever side code is being read. Any fixes for this?

Thanks so much for any additional help on this.

I’m not too sure what you mean, but check if the documentation here fits what you’re trying to do:

I couldn’t say, I don’t really know what you’re doing.

You set your Build configuration based on what you have in your repository and the steps Netlify would need to take to get the deployment you want.

You’re effectively telling them “go to this directory (base directory), run this command (build command), output these files (publish directory)”.

If you change what is in your repository, you may find that you have to change the instructions you’re providing to Netlify.

I couldn’t say as I’m not sure what you’re referring to.