Attempting to load a 3D object into three.js, I decided to start with the very first basic example in the documentation since I am new to this. Everything seemed fine until I added the import line according to the documentation; suddenly, the scene disappeared and an error appeared in the console:
(index):1 Uncaught TypeError: Failed to resolve module specifier "three/examples/jsm/loaders/GLTFLoader.js". Relative references must start with either "/", "./", or "../"
I simply copied this line from the three.js documentation, so I am unsure why there is an issue with referencing the loader.
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
If anyone can help me understand what went wrong, I would greatly appreciate it. I am using macOS and Atom Live Server for the preview.