My goal is to utilize Three.js along with three-bmfont-text in order to generate 3D text and enhance its appearance using shaders.
After installing three and three-bmfont-text via npm, I imported them into my JS file:
import * as THREE from 'three';
const loadFont = require('load-bmfont');
const createGeometry = require('three-bmfont-text');
Upon running npm run dev and npm run watch, everything appears to be functioning properly. However, an error is logged in the Chrome developer console:
app.js:3524 Uncaught ReferenceError: THREE is not defined at Object../node_modules/three-bmfont-text/index.js
Despite attempting to reinstall both three and three-bmfont-text, the issue persists. What could I be overlooking?