I created a simple portfolio website using the main.js
file. It functions properly when viewed on my local server, but once I upload the code to GitHub and deploy it, the JavaScript files don't seem to load.
Although I can see the HTML
and CSS
files, the main.js
file fails to load. I attempted different solutions such as using gh-pages and creating a dist folder, but unfortunately, none of them worked.
The console is displaying the following error message:
THREE.WebGLRenderer: A WebGL context could not be created.
Any suggestions on how I can resolve this issue? Feel free to check out my code.