Hey guys, I have a weird bug on my site when I deploy my Astro site to Netlify. When I use npm run dev, all of my site's JS works.
But when I deploy my site to Netlify through GitHub, my site's JS references which do not use the defer attribute are loading perfectly fine.
However, the ones that have the defer attribute fail to load on the deployed site! They have the following error:
GET[https://www.alieninsectbass.com/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js](https://www.alieninsectbass.com/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js "https://www.alieninsectbass.com/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js")[HTTP/2 404 9ms]
GET[https://www.alieninsectbass.com/src/scripts/tooltips.js](https://www.alieninsectbass.com/src/scripts/tooltips.js "https://www.alieninsectbass.com/src/scripts/tooltips.js")[HTTP/2 404 9ms]
GET[https://www.alieninsectbass.com/src/scripts/searchfunctions.js](https://www.alieninsectbass.com/src/scripts/searchfunctions.js "https://www.alieninsectbass.com/src/scripts/searchfunctions.js")[HTTP/2 404 9ms]
I need the defer attributes on those three scripts because otherwise my code throws a vite error that causes my entire site to crash.
Can someone help me fix this?