I made a basic portfolio website using three.js. It works fine in local server but when I upload the code to github and deploy it, it doesn’t work. I only see html and CSS files but the three.js files won’t load. I even tried using gh-pages and creating dist folder but it still doesn’t work. My console has the following error:

Do you mind sharing the link to your deployed app?
/cc
elfa6.github.io/Ayla/
It only loads HTML and CSS code but not JavaScript.
I’ve written an answer at stackoverflow
.
Thank you.
It does load. I see now 404 error. However there is this error:
Uncaught TypeError: Failed to resolve module specifier “three”. Relative references must start with either “/”, “./”, or “…/”.
Since you are using OrbitControls, you have to define an import map like in the official examples.
And how can I do that?
Just study one of the official examples, e.g. three.js webgl - geometry - cube.
