I am having a really hard time understanding why my program is crashing due to this error:
Uncaught TypeError: Failed to resolve module specifier "three/examples/jsm/loaders/GLTFLoader.js". Relative references must start with either "/", "./", or "../".
I am trying to make my html file communicate with the serial.js file that I created. The html is simply in the project folder, but the serial.js file is being stored in a js folder that I have for the project (needed to import some object loader templates downloaded from the three.js website.)
This is what I've tried so far in my html code:
<html>
<head>
<title>Three.js Crash Course</title>
<style>
body
{
margin: 0;
}
canvas
{
width: 100%; height: 100%;
}
</style>
</head>
<body>
<script src = "js/three.js"></script>
<script src = "js/OrbitControls.js"></script>
<script type = "module" src = "./js/serial.js"></script>
</body>
</html>
I've also tried it with just "/js/serial"..ect and "../js/serial.js". Why is it not recognizing and running the file?
I've also included an image if it's helpful for understanding the way I've set up my file structure.
