Transitioning from plain Javascript Threejs to the node version has presented me with an early roadblock.
OrbitControls seemed to work fine, but as soon as I try to import any postprocessing, I encounter the following error:
https://i.sstatic.net/d7yja.png
The problematic code snippet is as follows:
import * as THREE from 'three';
import {OutlinePass} from 'three/examples/jsm/postprocessing/OutlinePass';
import {OrbitControls} from 'three/examples/jsm/controls/OrbitControls';
import Stats from 'three/examples/jsm/libs/stats.module';
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100);
camera.position.z = 2;
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var outline = new OutlinePass(new THREE.Vector2(window.innerWidth, window.innerHeight), scene, camera);
As you can see, I haven't utilized the OutlinePass functionality yet due to my struggles in importing it. The same issue arises when attempting to import EffectsComposer in a similar fashion. Despite intellisense suggesting correct directory paths, the imports refuse to cooperate. Is there something amiss in my approach?