Javascript file not being deployed

Hi,

I am trying to deploy a website from GitHub on Netlify but I am having an issue with the JavaScript file not uploading. This is GitHub repo of the website: GitHub - debbie1505/Scoreboard: This is a scoreboard for keeping track of scores and the winners during a game with an interval timer of 60 secs. This is how the website works when I deploy it on GitHub pages: https://debbie1505.github.io/Scoreboard/. And lastly this is the GitHub how the website looks like and acts when I deploy it using Netlify: https://scoretrack.netlify.app/.

Because the JavaScript file is missing, the logic behind the website is also missing like, for example the buttons are not working. I am not exactly sure why it is not working. I tried deploying it again but it’s not working, was hoping someone can help me.

This is how my deploy summary looks like if it helps. I was going to also embed a picture of the deploy log and file browser but I can embed one file to this post so if they are needed to provide to more context, I’ll gladly provide that information.

I saw a post of someone saying, they just deleted every other file except their html, css, and js file and I did that by deleting my package.json file but now I am getting errors. This is the error I am getting:

@thai Deleting all the build files isn’t usually what someone would want to do, but your code looks simple enough that it should work for you.

The reason you’re hitting the issue with the build command failing, is because you no longer have a package.json file and you no longer need to run a build at all.

Adjust your Build Configuration and remove the Build command.

So, delete npm run build

@nathanmartin Hi thank you for getting back to me, I did what you said and it works. I deleted the json file because it has the specs for vite and I wasn’t using vite for the project, as you said, it was a simple project. My question now is if I was to have other dependencies like using node.js and I needed a json for my project, how would I go about configuring the build configuration.

The precise configuration will depend on the system you’re working with.

You should always familiarize yourself with what you’re using, read the documentation etc.

If this was Vite, then:

In particular, the sections related to performing a production build:

Or deploying a static site:

You also obviously wouldn’t delete all your configuration files.

With a Vite site, generally you want something like:

Base directory = (depends on your repository structure, usually the default/blank)
Package directory = (depends on your repository structure, usually the default/blank)
Build command = npm run build
Publish directory = dist