In the JavaScript file I'm working with, I have added two import
statements at the beginning:
import { FbxLoader } from "./ThreeJs/examples/jsm/loaders/FBXLoader.js";
import * as Three from "./ThreeJs/src/Three.js";
However, when I try to load this file in a browser, I encounter the error
Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../".
. Oddly enough, commenting out the first import
statement resolves the error, even though the error message still references "three" from the second import
.
Even when I switch the order of the two import
statements, the same error persists in the browser console.
What could be causing this issue? Both files definitely exist and the paths are correct. If I intentionally provide an incorrect file name, I get a 404 error instead of this module specifier problem, so it doesn't seem to be a path error.