My Website Javascript isn't loading on GitHub Desktop Deploy

Hello Guys, I’m in need of some Help.
I have created a Scoreboard Using HTML , CSS & JAVASCRIPT , and i have deployed on Netlify using GitHub Desktop .
The site works fine Locally when i use the VS Code Live server , But when i Deployed Using the GitHub Repository the Javascript goes missing , It looks like it haven’t been Deployed at all .
When i try to deploy it Manually it work’s fine. It only doesn’t work when deployed through
GitHub desktop .
Does anyone knows how to fix that ?

GitHub Desktop Deploy : ( https://stellar-marzipan-f148ce.netlify.app/ )
GitHub Repo : ( GitHub - DantDev/scoreBoardNew )
Manual Deploy : ( https://stellular-cuchufli-658eca.netlify.app/ )

Hello @DantDev, thanks for the post and welcome to the Netlify Support Forums.
It seems your commits are not pushed to the repository when you use the GitHub desktop application.
If you haven’t already checked the GitHub documentation, kindly visit the link below how to push changes to a repository using GitHub desktop.

Pushing changes to GitHub Using GitHub Desktop

Thanks.

1 Like

Hi, @DantDev. I would also recommend downloading your site’s deploys (instructions below):

When I compare the two deploys, the GitHub Desktop deploy is missing the javascript file entirely:

For stellar-marzipan-f148ce:

/index.html
/assets/index.44ef735e.css

For stellular-cuchufli-658eca:

/index.css
/index.js
/index.html

Looking at the commit when the deploy was made, that is how this repo builds the site:

I tested cloning your repo, changing to that commit, and running the build command:

$ nvm install 16.18.1
Downloading and installing node v16.18.1...
Downloading https://nodejs.org/dist/v16.18.1/node-v16.18.1-linux-x64.tar.xz...
############################################################################################################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v16.18.1 (npm v8.19.2)
username@sandbox-ubuntu : ~/tmp/scoreBoardNew : 2022-12-16 01:08:52 :
$ nvm use 16.18.1
Now using node v16.18.1 (npm v8.19.2)
username@sandbox-ubuntu : ~/tmp/scoreBoardNew : 2022-12-16 01:09:02 :
$ npm install

added 14 packages, and audited 15 packages in 3s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 8.19.2 -> 9.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0
npm notice Run npm install -g npm@9.2.0 to update!
npm notice
username@sandbox-ubuntu : ~/tmp/scoreBoardNew : 2022-12-16 01:09:19 :
$ npm run build

> build
> vite build

vite v4.0.1 building for production...
<script src="index.js"> in "/index.html" can't be bundled without type="module" attribute
✓ 2 modules transformed.
dist/index.html                 1.13 kB
dist/assets/index-44ef735e.css  0.68 kB │ gzip: 0.36 kB
username@sandbox-ubuntu : ~/tmp/scoreBoardNew : 2022-12-16 01:09:24 :
$ ls dist/
assets	index.html
username@sandbox-ubuntu : ~/tmp/scoreBoardNew : 2022-12-16 01:09:30 :
$ tree dist/
dist/
├── assets
│   └── index-44ef735e.css
└── index.html

1 directory, 2 files

The javascript is missing because your site’s build command puts no javascript into the dist directory. The error is in the site’s code.

2 Likes

Sorry , but i’m kinda dumb .
What do i have to do to make it work? i didn’t understood
should i download it and run :
nvm install
npm install
npm run build
?
Thank’s for spending your time trying to help me .
you guys are the best.

Hi @DantDev :wave:t6: welcome to the forums! Sorry to hear you are having trouble with your site. This isn’t a Netlify specific question. It seems you are having trouble with your code and that is something you will have to debug on your own as we can’t do it for you. I wish I could provide better feedback. Perhaps openstack and other general forums for code queries may be of use to you. Happy building. :rocket: