Relative Content

Tag Archive for javascripthtmldeploymentgithub-pagesnetlify

JavaScript buttons work locally but not after deploying to GitHub and Netlify (function not defined error)

I’m working on a Scoreboard dashboard as part of a learning project. The JavaScript functions in my app work perfectly in Visual Studio Code. However, after deploying the project to GitHub Pages and Netlify, the buttons in my counter app don’t work at all. When I click them, I get a “function is not defined” error (404), which makes me think that the index.js file isn’t loading properly.