Trying to import GLTFLoader from three.js (loaded via npm) but getting this error below, here's my import (tried adding '/', './', and '../' same error)
ERROR
index.html:1 Uncaught TypeError: Failed to resolve module specifier
"node_modules/three/examples/jsm/loaders/GLTFLoader.js". Relative
references must start with either "/", "./", or "../".
IMPORT
const THREE = require('three'); //works
import { GLTFLoader } from 'node_modules/three/examples/jsm/loaders/GLTFLoader.js';//error
Aucun commentaire:
Enregistrer un commentaire