Unity WebGL doesn't work on github pages.

I built my game to webgl and it worked on itch.io but it doesn’t load on github pages. I checked the console in inspect element and it gave the errors shown in the pictures.

I’ve tried everything but nothing works, I’ve tested in both chrome and firefox.
If anyone could help it would be great!

I figured it out, the gitignore was ignoring the build folder.