#My button doesn't work on netlify

3 messages · Page 1 of 1 (latest)

rich chasm
#

Hi everyone, so as we know on a Javascript class, we're assigned to create a scoreboard solo project. mine works well on browser preview or inside VS code.
however, after deploying the project through netlify, the button wont work.
can anyone help me?

netlify : https://ma-basketball-scoreboard.netlify.app/
GitHub : https://github.com/MAthewatcher/Scoreboard.git

GitHub

A game score tracker. Contribute to MAthewatcher/Scoreboard development by creating an account on GitHub.

stuck gazelle
#

You can try to run npm run build and see if some connections are missing like for example my script before build is.
<script type="module" src="/src/main.tsx"></script>
and in the dist folder after you run build it is now.
<script type="module" crossorigin src="/assets/index-Co5b13g_.js"></script>
which correctly connects to my .js file in the dist folder.

thorn veldt
#

That, or since this is a static site, I'd delete all the package.json, vite.config etc. Keep the files on local if you want, but I'd try with only the 3 main files only (html, css and js)