While working on my threejs project, I encountered an issue when trying to render text. Every time I add the following modules:
import { FontLoader } from 'https://threejs.org/examples/jsm/loaders/FontLoader.js';
import { TextGeometry } from 'https://threejs.org/examples/jsm/geometries/TextGeometry.js';
I keep getting this error message:
Uncaught TypeError: Error resolving module specifier “three”. Relative module specifiers must start with “./”, “../” or “/”. FontLoader.js:5:7
The error seems to originate from FontLoader.js. Interestingly, when I exclude these modules, three js is able to render the scene without any issues. When checking my network log, all modules appear to be loading correctly with status 200 OK.